Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mackyle/15f9aa33a299491e7bb9318b650f08b2 to your computer and use it in GitHub Desktop.
Save mackyle/15f9aa33a299491e7bb9318b650f08b2 to your computer and use it in GitHub Desktop.
LibreSSL 2.5.4 tarball patch to allow ocspcheck DEFAULT_CA_FILE override
From: Kyle J. McKay <mackyle@gmail.com>
Subject: [PATCH] ocspcheck/http.c: allow DEFAULT_CA_FILE override
The value of DEFAULT_CA_FILE is hard-coded to "/etc/ssl/cert.pem"
in the ocpscheck/http.c file.
This may not always be the desired default location. Allow the
default to be changed with a command-line define via CPPFLAGS the
same way the same-named value can be changed for nc/netcat.c.
Instead of always defining DEFAULT_CA_FILE, only define it if
it's not already defined.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
apps/ocspcheck/http.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/apps/ocspcheck/http.c b/apps/ocspcheck/http.c
index 6830baca..4683f5ab 100644
--- a/apps/ocspcheck/http.c
+++ b/apps/ocspcheck/http.c
@@ -35,7 +35,9 @@
#include "http.h"
#include <tls.h>
+#ifndef DEFAULT_CA_FILE
#define DEFAULT_CA_FILE "/etc/ssl/cert.pem"
+#endif
/*
* A buffer for transferring HTTP/S data.
--
tg: (151b6554..) t/default-override (depends on: t/release)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment