diff options
author | wiz <wiz@pkgsrc.org> | 2014-03-21 15:14:21 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-03-21 15:14:21 +0000 |
commit | f237df2920b9ac5047554ef45a43124fc40cfe01 (patch) | |
tree | db1a2e9977b5ad80c6e92cd025ff2c152ed11352 /security | |
parent | f8e6b405896f9b487499d35f18aac319f5f73f36 (diff) | |
download | pkgsrc-f237df2920b9ac5047554ef45a43124fc40cfe01.tar.gz |
Fixes linkage on NetBSD up to the version that has openssl fixed
to include d1_meth.c.
Based on upstream patch from
https://gist.github.com/reaperhulk/5e4d3d30ac1598473206
Diffstat (limited to 'security')
-rw-r--r-- | security/py-cryptography/distinfo | 3 | ||||
-rw-r--r-- | security/py-cryptography/patches/patch-cryptography_hazmat_bindings_openssl_ssl.py | 48 |
2 files changed, 50 insertions, 1 deletions
diff --git a/security/py-cryptography/distinfo b/security/py-cryptography/distinfo index 7892b656fff..ea0e0924ce0 100644 --- a/security/py-cryptography/distinfo +++ b/security/py-cryptography/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.2 2014/03/21 14:02:45 wiz Exp $ +$NetBSD: distinfo,v 1.3 2014/03/21 15:14:21 wiz Exp $ SHA1 (cryptography-0.2.2.tar.gz) = 578e6a4cae6e24ecfa7069e1924ca99bd3c7d3ba RMD160 (cryptography-0.2.2.tar.gz) = 8203428fbef935cafe897ae0878ac7e482781211 Size (cryptography-0.2.2.tar.gz) = 13772494 bytes +SHA1 (patch-cryptography_hazmat_bindings_openssl_ssl.py) = f599f85c9b4e344cc9cd5d97a5a94ee9e5bcb9a9 SHA1 (patch-cryptography_hazmat_bindings_utils.py) = ca5d740e397c5d49eb6934a4e94009866cef20ef SHA1 (patch-cryptography_hazmat_primitives_constant__time.py) = 75a2a83930917059ad6e4dac14fcae0c7585d426 SHA1 (patch-cryptography_hazmat_primitives_padding.py) = 7c8b367c95a76f769e641587118d75597e3ce552 diff --git a/security/py-cryptography/patches/patch-cryptography_hazmat_bindings_openssl_ssl.py b/security/py-cryptography/patches/patch-cryptography_hazmat_bindings_openssl_ssl.py new file mode 100644 index 00000000000..31ed58d505c --- /dev/null +++ b/security/py-cryptography/patches/patch-cryptography_hazmat_bindings_openssl_ssl.py @@ -0,0 +1,48 @@ +$NetBSD: patch-cryptography_hazmat_bindings_openssl_ssl.py,v 1.1 2014/03/21 15:14:21 wiz Exp $ + +Fixes linkage on NetBSD-current up to the version that has openssl fixed +to include d1_meth.c. +Based on upstream patch from +https://gist.github.com/reaperhulk/5e4d3d30ac1598473206 + +--- cryptography/hazmat/bindings/openssl/ssl.py.orig 2014-03-04 01:53:14.000000000 +0000 ++++ cryptography/hazmat/bindings/openssl/ssl.py +@@ -37,6 +37,7 @@ static const int Cryptography_HAS_RELEAS + static const int Cryptography_HAS_OP_NO_COMPRESSION; + + static const int Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING; ++static const long Cryptography_HAS_NETBSD_D1_METH; + + static const int SSL_FILETYPE_PEM; + static const int SSL_FILETYPE_ASN1; +@@ -365,6 +366,19 @@ const long SSL_OP_MSIE_SSLV2_RSA_PADDING + #ifdef OPENSSL_NO_EC + long (*SSL_CTX_set_tmp_ecdh)(SSL_CTX *, EC_KEY *) = NULL; + #endif ++ ++// NetBSD shipped without including d1_meth.c. Sad trombone. ++#ifdef __NetBSD__ ++# include <sys/param.h> ++# if (__NetBSD_Version__ < 699003800) ++static const long Cryptography_HAS_NETBSD_D1_METH = 0; ++const SSL_METHOD* DTLSv1_method(void) { return NULL; }; ++# else ++static const long Cryptography_HAS_NETBSD_D1_METH = 1; ++# endif ++#else ++static const long Cryptography_HAS_NETBSD_D1_METH = 1; ++#endif + """ + + CONDITIONAL_NAMES = { +@@ -408,5 +422,9 @@ CONDITIONAL_NAMES = { + + "Cryptography_HAS_EC": [ + "SSL_CTX_set_tmp_ecdh", +- ] ++ ], ++ ++ "Cryptography_HAS_NETBSD_D1_METH": [ ++ "DTLSv1_method", ++ ], + } |