FreeBSD Bugzilla – Attachment 181970 Details for
Bug 212149
security/strongswan: Runtime failures with LibreSSL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff for security/strongswan
patch-security_strongswan-LibreSSL (text/plain), 4.31 KB, created by
Bernard Spil
on 2017-04-21 07:37:52 UTC
(
hide
)
Description:
svn diff for security/strongswan
Filename:
MIME Type:
Creator:
Bernard Spil
Created:
2017-04-21 07:37:52 UTC
Size:
4.31 KB
patch
obsolete
>Index: security/strongswan/files/patch-src_libstrongswan_plugins_openssl_openssl__plugin.c >=================================================================== >--- security/strongswan/files/patch-src_libstrongswan_plugins_openssl_openssl__plugin.c (revision 426310) >+++ security/strongswan/files/patch-src_libstrongswan_plugins_openssl_openssl__plugin.c (working copy) >@@ -1,6 +1,17 @@ >---- src/libstrongswan/plugins/openssl/openssl_plugin.c.orig 2016-06-30 14:20:10 UTC >+--- src/libstrongswan/plugins/openssl/openssl_plugin.c.orig 2016-10-08 12:17:09 UTC > +++ src/libstrongswan/plugins/openssl/openssl_plugin.c >-@@ -573,7 +573,7 @@ plugin_t *openssl_plugin_create() >+@@ -20,6 +20,10 @@ >+ #include <threading/mutex.h> >+ #include <threading/thread_value.h> >+ >++#ifdef LIBRESSL_VERSION_NUMBER >++#define OPENSSL_VERSION_NUMBER 0x1000107fL >++#endif >++ >+ #include <openssl/err.h> >+ #include <openssl/evp.h> >+ #include <openssl/conf.h> >+@@ -623,7 +627,7 @@ plugin_t *openssl_plugin_create() > }, > ); > >Index: security/strongswan/files/patch-src_libstrongswan_plugins_openssl_openssl__rsa__public__key.h >=================================================================== >--- security/strongswan/files/patch-src_libstrongswan_plugins_openssl_openssl__rsa__public__key.h (nonexistent) >+++ security/strongswan/files/patch-src_libstrongswan_plugins_openssl_openssl__rsa__public__key.h (working copy) >@@ -0,0 +1,104 @@ >+--- src/libstrongswan/plugins/openssl/openssl_rsa_public_key.h.orig 2016-04-22 20:01:35 UTC >++++ src/libstrongswan/plugins/openssl/openssl_rsa_public_key.h >+@@ -21,6 +21,101 @@ >+ #ifndef OPENSSL_RSA_PUBLIC_KEY_H_ >+ #define OPENSSL_RSA_PUBLIC_KEY_H_ >+ >++#if OPENSSL_VERSION_NUMBER < 0x10100000L >++/** >++ * OpenSSL compat functions >++ * From https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes >++*/ >++ >++#include <string.h> >++#include <openssl/engine.h> >++ >++int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) >++{ >++ /* If the fields n and e in r are NULL, the corresponding input >++ * parameters MUST be non-NULL for n and e. d may be >++ * left NULL (in case only the public key is used). >++ */ >++ if ((r->n == NULL && n == NULL) >++ || (r->e == NULL && e == NULL)) >++ return 0; >++ >++ if (n != NULL) { >++ BN_free(r->n); >++ r->n = n; >++ } >++ if (e != NULL) { >++ BN_free(r->e); >++ r->e = e; >++ } >++ if (d != NULL) { >++ BN_free(r->d); >++ r->d = d; >++ } >++ >++ return 1; >++} >++ >++int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) >++{ >++ /* If the fields p and q in r are NULL, the corresponding input >++ * parameters MUST be non-NULL. >++ */ >++ if ((r->p == NULL && p == NULL) >++ || (r->q == NULL && q == NULL)) >++ return 0; >++ >++ if (p != NULL) { >++ BN_free(r->p); >++ r->p = p; >++ } >++ if (q != NULL) { >++ BN_free(r->q); >++ r->q = q; >++ } >++ >++ return 1; >++} >++ >++int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) >++{ >++ /* If the fields dmp1, dmq1 and iqmp in r are NULL, the corresponding input >++ * parameters MUST be non-NULL. >++ */ >++ if ((r->dmp1 == NULL && dmp1 == NULL) >++ || (r->dmq1 == NULL && dmq1 == NULL) >++ || (r->iqmp == NULL && iqmp == NULL)) >++ return 0; >++ >++ if (dmp1 != NULL) { >++ BN_free(r->dmp1); >++ r->dmp1 = dmp1; >++ } >++ if (dmq1 != NULL) { >++ BN_free(r->dmq1); >++ r->dmq1 = dmq1; >++ } >++ if (iqmp != NULL) { >++ BN_free(r->iqmp); >++ r->iqmp = iqmp; >++ } >++ >++ return 1; >++} >++ >++void RSA_get0_key(const RSA *r, >++ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) >++{ >++ if (n != NULL) >++ *n = r->n; >++ if (e != NULL) >++ *e = r->e; >++ if (d != NULL) >++ *d = r->d; >++} >++ >++#endif >++ >+ typedef struct openssl_rsa_public_key_t openssl_rsa_public_key_t; >+ >+ #include <credentials/keys/public_key.h> > >Property changes on: security/strongswan/files/patch-src_libstrongswan_plugins_openssl_openssl__rsa__public__key.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:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ 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 212149
:
175126
|
181958
|
181970
|
182037
|
182070
|
182090
|
182091