Monday, September 07, 2020

Re: Prepare pypy and py-cryptography for LIBRESSL_HAS_TLS1_3

On Mon, Sep 07, 2020 at 07:29:20AM +0200, Theo Buehler wrote:
> This diff (to be applied from /usr/ports) is currently a no-op and will
> make sure that pypy and py-cryptography will continue to build once we
> expose LIBRESSL_HAS_TLS1_3 publically. pypy bundles the patched ssl.py,
> so it defnitely needs a revision bump. py-cryptography probably doesn't
> need a bump, but I included it anyway.
>
> edd, I know that you're currently doing a non-trivial operation in pypy.
> I can wait and easily regen the pypy diff once pypy-7.3.1 lands if you
> prefer.

Apparently, it's preferable not to use the LIBRESSL_HAS_TLS1_3 define
directly. Here is an equivalent diff that uses CRYPTOGRAPHY_IS_LIBRESSL
and checks for availability of TLS1_3_VERSION.

Index: lang/pypy/Makefile
===================================================================
RCS file: /var/cvs/ports/lang/pypy/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- lang/pypy/Makefile 18 Apr 2020 10:15:26 -0000 1.41
+++ lang/pypy/Makefile 6 Sep 2020 23:09:53 -0000
@@ -29,6 +29,7 @@ BOOTSTRAP-aarch64 = pypy-bootstrap-aarch
# list bootstraps for all arches in SUPDISTFILES
SUPDISTFILES += ${BOOTSTRAP-amd64}:0
SUPDISTFILES += ${BOOTSTRAP-aarch64}:0
+REVISION = 0

CATEGORIES = lang

Index: lang/pypy/patches/patch-lib_pypy__cffi_ssl__cffi_src_openssl_ssl_py
===================================================================
RCS file: lang/pypy/patches/patch-lib_pypy__cffi_ssl__cffi_src_openssl_ssl_py
diff -N lang/pypy/patches/patch-lib_pypy__cffi_ssl__cffi_src_openssl_ssl_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/pypy/patches/patch-lib_pypy__cffi_ssl__cffi_src_openssl_ssl_py 7 Sep 2020 07:24:02 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: lib_pypy/_cffi_ssl/_cffi_src/openssl/ssl.py
+--- lib_pypy/_cffi_ssl/_cffi_src/openssl/ssl.py.orig
++++ lib_pypy/_cffi_ssl/_cffi_src/openssl/ssl.py
+@@ -836,7 +836,8 @@ static const long Cryptography_HAS_CIPHER_DETAILS = 0;
+ static const long Cryptography_HAS_CIPHER_DETAILS = 1;
+

No comments:

Post a Comment