aports/community/stunnel/libressl-2.7.patch
prspkt 769eb61b26 community/stunnel: upgrade to 5.46
Use https for source and upstream URLs.
Bundled certificates are valid until Apr-12-2029.
2018-06-07 12:39:26 +00:00

27 lines
1.0 KiB
Diff

diff --git a/src/ctx.c b/src/ctx.c
index b54fdbd..ef9aca1 100644
--- a/src/ctx.c
+++ b/src/ctx.c
@@ -407,7 +407,7 @@ NOEXPORT int ecdh_init(SERVICE_OPTIONS *section) {
/**************************************** initialize OpenSSL CONF */
NOEXPORT int conf_init(SERVICE_OPTIONS *section) {
-#if OPENSSL_VERSION_NUMBER>=0x10002000L
+#if OPENSSL_VERSION_NUMBER>=0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
SSL_CONF_CTX *cctx;
NAME_LIST *curr;
char *cmd, *param;
diff --git a/src/verify.c b/src/verify.c
index f9b9105..3b61b79 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -353,7 +353,7 @@ NOEXPORT int cert_check_local(X509_STORE_CTX *callback_ctx) {
cert=X509_STORE_CTX_get_current_cert(callback_ctx);
subject=X509_get_subject_name(cert);
-#if OPENSSL_VERSION_NUMBER<0x10100006L
+#if OPENSSL_VERSION_NUMBER<0x10100006L || defined(LIBRESSL_VERSION_NUMBER)
#define X509_STORE_CTX_get1_certs X509_STORE_get1_certs
#endif
/* modern API allows retrieving multiple matching certificates */