From b71c39202ba2d7dfb7a89215e04946e7fbf92896 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 21 Jun 2022 14:10:43 -0400 Subject: [PATCH] Changelog and version bump for 37.0.3 (#7362) * Changelog and version bump for 37.0.3 * Fix Alpine python version in CI --- .circleci/config.yml | 2 +- .github/workflows/ci.yml | 4 ++-- CHANGELOG.rst | 7 +++++++ src/cryptography/__about__.py | 4 ++-- src/cryptography/hazmat/backends/openssl/backend.py | 4 +++- vectors/cryptography_vectors/__about__.py | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d3d5d7130979..02dd53e40d60 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,7 +74,7 @@ workflows: - linux-arm64: name: linux-arm64-alpine-ci image: ghcr.io/pyca/cryptography-runner-alpine:aarch64 - toxenv: py39 + toxenv: py310 filters: tags: only: /.*/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43da403cc4cd..bc90a2f7cbf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -148,7 +148,7 @@ jobs: - {IMAGE: "ubuntu-jammy", TOXENV: "py310"} - {IMAGE: "ubuntu-rolling", TOXENV: "py310"} - {IMAGE: "fedora", TOXENV: "py310"} - - {IMAGE: "alpine", TOXENV: "py39"} + - {IMAGE: "alpine", TOXENV: "py310"} name: "${{ matrix.IMAGE.TOXENV }} on ${{ matrix.IMAGE.IMAGE }}" timeout-minutes: 15 steps: @@ -412,7 +412,7 @@ jobs: run: | CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1 \ LDFLAGS="${HOME}/openssl-macos-x86-64/lib/libcrypto.a ${HOME}/openssl-macos-x86-64/lib/libssl.a" \ - CFLAGS="-I${HOME}/openssl-macos-x86-64/include -Werror -Wno-error=deprecated-declarations -Wno-error=incompatible-pointer-types-discards-qualifiers -Wno-error=unused-function -Wno-error=unused-command-line-argument -mmacosx-version-min=10.10 -march=core2 $EXTRA_CFLAGS" \ + CFLAGS="-I${HOME}/openssl-macos-x86-64/include -Werror -Wno-error=deprecated-declarations -Wno-error=incompatible-pointer-types-discards-qualifiers -Wno-error=unused-function -Wno-error=unused-command-line-argument -mmacosx-version-min=10.10 $EXTRA_CFLAGS" \ tox -vvv -r -- --color=yes --wycheproof-root=wycheproof env: TOXENV: ${{ matrix.PYTHON.TOXENV }} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7b66e4c4b89a..d52a0ee41aac 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,13 @@ Changelog ========= +.. _v37-0-3: + +37.0.3 - 2022-06-21 +~~~~~~~~~~~~~~~~~~~ + +* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.0.4. + .. _v37-0-2: 37.0.2 - 2022-05-03 diff --git a/src/cryptography/__about__.py b/src/cryptography/__about__.py index 5bf8b6669be8..b581d90b6fe0 100644 --- a/src/cryptography/__about__.py +++ b/src/cryptography/__about__.py @@ -9,7 +9,7 @@ "__copyright__", ] -__version__ = "37.0.2" +__version__ = "37.0.3" __author__ = "The Python Cryptographic Authority and individual contributors" -__copyright__ = "Copyright 2013-2021 {}".format(__author__) +__copyright__ = "Copyright 2013-2022 {}".format(__author__) diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index bf34946cbbfc..42fb44648e86 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -713,7 +713,9 @@ def _evp_pkey_to_public_key(self, evp_pkey) -> PUBLIC_KEY_TYPES: return _DSAPublicKey(self, dsa_cdata, evp_pkey) elif key_type == self._lib.EVP_PKEY_EC: ec_cdata = self._lib.EVP_PKEY_get1_EC_KEY(evp_pkey) - self.openssl_assert(ec_cdata != self._ffi.NULL) + if ec_cdata == self._ffi.NULL: + errors = self._consume_errors_with_text() + raise ValueError("Unable to load EC key", errors) ec_cdata = self._ffi.gc(ec_cdata, self._lib.EC_KEY_free) return _EllipticCurvePublicKey(self, ec_cdata, evp_pkey) elif key_type in self._dh_types: diff --git a/vectors/cryptography_vectors/__about__.py b/vectors/cryptography_vectors/__about__.py index de175e38dbb6..5af72d578be5 100644 --- a/vectors/cryptography_vectors/__about__.py +++ b/vectors/cryptography_vectors/__about__.py @@ -6,4 +6,4 @@ "__version__", ] -__version__ = "37.0.2" +__version__ = "37.0.3"