From owner-dev-commits-ports-all@freebsd.org Fri May 21 04:33:13 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27AAC6500CD; Fri, 21 May 2021 04:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FmYd50X4dz3DJh; Fri, 21 May 2021 04:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDF412AD5; Fri, 21 May 2021 04:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14L4XC2V082279; Fri, 21 May 2021 04:33:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14L4XCu4082278; Fri, 21 May 2021 04:33:12 GMT (envelope-from git) Date: Fri, 21 May 2021 04:33:12 GMT Message-Id: <202105210433.14L4XCu4082278@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Charlie Li Subject: git: 6f05c9c07cff - main - security/py-cryptography: fix build with LibreSSL 3.3.2+ MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vishwin X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f05c9c07cffc6ae65d8a1ea55096d3b9968e33b Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2021 04:33:13 -0000 The branch main has been updated by vishwin: URL: https://cgit.FreeBSD.org/ports/commit/?id=6f05c9c07cffc6ae65d8a1ea55096d3b9968e33b commit 6f05c9c07cffc6ae65d8a1ea55096d3b9968e33b Author: Charlie Li AuthorDate: 2021-04-19 23:30:08 +0000 Commit: Charlie Li CommitDate: 2021-05-21 04:32:25 +0000 security/py-cryptography: fix build with LibreSSL 3.3.2+ Merged upstream as https://github.com/pyca/cryptography/pull/5988 and backported to this version. Approved by: koobs (maintainer), fluffy (mentor) PR: 255241 --- .../files/patch-Fix-build-with-LibreSSL-3.3.2-5988 | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/security/py-cryptography/files/patch-Fix-build-with-LibreSSL-3.3.2-5988 b/security/py-cryptography/files/patch-Fix-build-with-LibreSSL-3.3.2-5988 new file mode 100644 index 000000000000..deb9c6408832 --- /dev/null +++ b/security/py-cryptography/files/patch-Fix-build-with-LibreSSL-3.3.2-5988 @@ -0,0 +1,62 @@ +From 94590a9aecc9e5ef6fc8eda52bae43643a4c44bd Mon Sep 17 00:00:00 2001 +From: Charlie Li +Date: Mon, 19 Apr 2021 18:38:38 -0400 +Subject: [PATCH] Fix build with LibreSSL 3.3.2 (#5988) + +* LibreSSL 3.3.2 supports SSL_OP_NO_DTLS* + +While here, bump CI + +* Fix preprocessor guards for LibreSSL's SSL_OP_NO_DTLS* + +DTLS_set_link_mtu and DTLS_get_link_min_mtu are not part of 3.3.2 + +* Switch to LESS_THAN context for LibreSSL 3.3.2 + +While here, fix indents + +* Remove extra C variable declaration + +The variable is not actually used from Python +--- + .github/workflows/ci.yml | 2 +- + src/_cffi_src/openssl/cryptography.py | 7 +++++++ + src/_cffi_src/openssl/ssl.py | 2 ++ + 3 files changed, 10 insertions(+), 1 deletion(-) + +diff --git src/_cffi_src/openssl/cryptography.py src/_cffi_src/openssl/cryptography.py +index e2b5a132..b9c7a793 100644 +--- src/_cffi_src/openssl/cryptography.py ++++ src/_cffi_src/openssl/cryptography.py +@@ -32,6 +32,13 @@ INCLUDES = """ + #include + #endif + ++#if CRYPTOGRAPHY_IS_LIBRESSL ++#define CRYPTOGRAPHY_LIBRESSL_LESS_THAN_332 \ ++ (LIBRESSL_VERSION_NUMBER < 0x3030200f) ++#else ++#define CRYPTOGRAPHY_LIBRESSL_LESS_THAN_332 (0) ++#endif ++ + #define CRYPTOGRAPHY_OPENSSL_110F_OR_GREATER \ + (OPENSSL_VERSION_NUMBER >= 0x1010006f && !CRYPTOGRAPHY_IS_LIBRESSL) + +diff --git src/_cffi_src/openssl/ssl.py src/_cffi_src/openssl/ssl.py +index 11a7d63a..081ef041 100644 +--- src/_cffi_src/openssl/ssl.py ++++ src/_cffi_src/openssl/ssl.py +@@ -586,8 +586,10 @@ static const long TLS_ST_OK = 0; + #endif + + #if CRYPTOGRAPHY_IS_LIBRESSL ++#if CRYPTOGRAPHY_LIBRESSL_LESS_THAN_332 + static const long SSL_OP_NO_DTLSv1 = 0; + static const long SSL_OP_NO_DTLSv1_2 = 0; ++#endif + long (*DTLS_set_link_mtu)(SSL *, long) = NULL; + long (*DTLS_get_link_min_mtu)(SSL *) = NULL; + #endif +-- +2.31.1 +