-/* $Id: http.c,v 1.21 2018/02/06 04:19:56 florian Exp $ */
+/* $Id: http.c,v 1.22 2018/08/08 17:47:44 deraadt Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
#include "http.h"
#include "extern.h"
-#define DEFAULT_CA_FILE "/etc/ssl/cert.pem"
-
/*
* A buffer for transferring HTTP/S data.
*/
-/* $Id: http.h,v 1.5 2017/01/25 13:52:53 inoguchi Exp $ */
+/* $Id: http.h,v 1.6 2018/08/08 17:47:44 deraadt Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
size_t bodypartsz; /* size of bodypart */
};
+#define DEFAULT_CA_FILE "/etc/ssl/cert.pem"
int http_init(void);
/* Convenience functions. */
-/* $Id: netproc.c,v 1.16 2018/03/14 12:28:25 florian Exp $ */
+/* $Id: netproc.c,v 1.17 2018/08/08 17:47:44 deraadt Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
memset(&paths, 0, sizeof(struct capaths));
memset(&c, 0, sizeof(struct conn));
+ if (unveil(DEFAULT_CA_FILE, "r") == -1) {
+ warn("unveil");
+ goto out;
+ }
+
if (pledge("stdio inet rpath", NULL) == -1) {
warn("pledge");
goto out;