FreeBSD Bugzilla – Attachment 194951 Details for
Bug 224148
security/stunnel: fix build with LibreSSL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to build stunnel 5.47 and 5.48 with LibreSSL 2.7
stunnel-5.48-libressl-2.7.diff (text/plain), 7.22 KB, created by
Michael Gmelin
on 2018-07-08 12:30:24 UTC
(
hide
)
Description:
Patch to build stunnel 5.47 and 5.48 with LibreSSL 2.7
Filename:
MIME Type:
Creator:
Michael Gmelin
Created:
2018-07-08 12:30:24 UTC
Size:
7.22 KB
patch
obsolete
>Index: security/stunnel/files/patch-src_common.h >=================================================================== >--- security/stunnel/files/patch-src_common.h (nonexistent) >+++ security/stunnel/files/patch-src_common.h (working copy) >@@ -0,0 +1,38 @@ >+--- src/common.h.orig 2017-01-02 14:27:26 UTC >++++ src/common.h >+@@ -448,7 +448,7 @@ extern char *sys_errlist[]; >+ #define OPENSSL_NO_TLS1_2 >+ #endif /* OpenSSL older than 1.0.1 || defined(OPENSSL_NO_TLS1) */ >+ >+-#if OPENSSL_VERSION_NUMBER>=0x10100000L >++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) >+ #ifndef OPENSSL_NO_SSL2 >+ #define OPENSSL_NO_SSL2 >+ #endif /* !defined(OPENSSL_NO_SSL2) */ >+@@ -474,7 +474,7 @@ extern char *sys_errlist[]; >+ #include <openssl/des.h> >+ #ifndef OPENSSL_NO_DH >+ #include <openssl/dh.h> >+-#if OPENSSL_VERSION_NUMBER<0x10100000L >++#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER) >+ int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); >+ #endif /* OpenSSL older than 1.1.0 */ >+ #endif /* !defined(OPENSSL_NO_DH) */ >+--- src/common.h.orig 2017-01-02 14:27:26 UTC >++++ src/common.h >+@@ -415,6 +415,15 @@ extern char *sys_errlist[]; >+ /* opensslv.h requires prior opensslconf.h to include -fips in version string */ >+ #include <openssl/opensslv.h> >+ >++#ifdef LIBRESSL_VERSION_NUMBER >++#undef OPENSSL_VERSION_NUMBER >++#if LIBRESSL_VERSION_NUMBER >= 0x2070000fL >++#define OPENSSL_VERSION_NUMBER 0x10100000L >++#else >++#define OPENSSL_VERSION_NUMBER 0x1000107fL >++#endif >++#endif >++ >+ #if OPENSSL_VERSION_NUMBER<0x0090700fL >+ #error OpenSSL 0.9.7 or later is required >+ #endif /* OpenSSL older than 0.9.7 */ > >Property changes on: security/stunnel/files/patch-src_common.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: security/stunnel/files/patch-src_ctx.c >=================================================================== >--- security/stunnel/files/patch-src_ctx.c (nonexistent) >+++ security/stunnel/files/patch-src_ctx.c (working copy) >@@ -0,0 +1,29 @@ >+--- src/ctx.c.orig 2017-08-17 09:18:53 UTC >++++ src/ctx.c >+@@ -295,7 +295,7 @@ NOEXPORT int matches_wildcard(char *serv >+ >+ #ifndef OPENSSL_NO_DH >+ >+-#if OPENSSL_VERSION_NUMBER<0x10100000L >++#if OPENSSL_VERSION_NUMBER<0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) >+ NOEXPORT STACK_OF(SSL_CIPHER) *SSL_CTX_get_ciphers(const SSL_CTX *ctx) { >+ return ctx->cipher_list; >+ } >+@@ -398,7 +398,7 @@ NOEXPORT int ecdh_init(SERVICE_OPTIONS * >+ /**************************************** 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; >+@@ -1227,7 +1227,7 @@ >+ >+ c=SSL_get_ex_data((SSL *)ssl, index_ssl_cli); >+ if(c) { >+-#if OPENSSL_VERSION_NUMBER>=0x10100000L >++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) >+ OSSL_HANDSHAKE_STATE state=SSL_get_state(ssl); >+ #else >+ int state=SSL_get_state((SSL *)ssl); > >Property changes on: security/stunnel/files/patch-src_ctx.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: security/stunnel/files/patch-src_options.c >=================================================================== >--- security/stunnel/files/patch-src_options.c (nonexistent) >+++ security/stunnel/files/patch-src_options.c (working copy) >@@ -0,0 +1,11 @@ >+--- src/options.c.orig 2017-11-15 07:06:12 UTC >++++ src/options.c >+@@ -3658,7 +3658,7 @@ NOEXPORT char *engine_init(void) { >+ } >+ #endif >+ /* engines can add new algorithms */ >+-#if OPENSSL_VERSION_NUMBER>=0x10100000L >++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) >+ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS| >+ OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); >+ #else > >Property changes on: security/stunnel/files/patch-src_options.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: security/stunnel/files/patch-src_ssl.c >=================================================================== >--- security/stunnel/files/patch-src_ssl.c (nonexistent) >+++ security/stunnel/files/patch-src_ssl.c (working copy) >@@ -0,0 +1,20 @@ >+--- src/ssl.c.orig 2017-10-07 14:23:08 UTC >++++ src/ssl.c >+@@ -51,7 +51,7 @@ int index_ssl_cli, index_ssl_ctx_opt; >+ int index_session_authenticated, index_session_connect_address; >+ >+ int ssl_init(void) { /* init TLS before parsing configuration file */ >+-#if OPENSSL_VERSION_NUMBER>=0x10100000L >++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) >+ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | >+ OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_LOAD_CONFIG, NULL); >+ #else >+@@ -87,7 +87,7 @@ int ssl_init(void) { /* init TLS before >+ } >+ >+ #ifndef OPENSSL_NO_DH >+-#if OPENSSL_VERSION_NUMBER<0x10100000L >++#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER) >+ /* this is needed for dhparam.c generated with OpenSSL >= 1.1.0 >+ * to be linked against the older versions */ >+ int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) { > >Property changes on: security/stunnel/files/patch-src_ssl.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: security/stunnel/files/patch-src_verify.c >=================================================================== >--- security/stunnel/files/patch-src_verify.c (nonexistent) >+++ security/stunnel/files/patch-src_verify.c (working copy) >@@ -0,0 +1,11 @@ >+--- src/verify.c.orig 2017-05-13 09:01:07 UTC >++++ src/verify.c >+@@ -353,7 +353,7 @@ NOEXPORT int cert_check_local(X509_STORE >+ 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 */ > >Property changes on: security/stunnel/files/patch-src_verify.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 224148
:
188593
|
194092
|
194951
|
206956
|
211224