diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2023-03-24 21:09:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 09:09:42 +0800 |
commit | 9dd0b26c48f567d5a7c4a0bc9f45ef2176a2d4a4 (patch) | |
tree | ea56241628a144f25ffb3d202c7b64b5774f42d1 /src/cryptography/hazmat/backends/openssl/backend.py | |
parent | 45e37718098edca2c5ac2135394bcf17fd7982f0 (diff) | |
download | cryptography-40.0.1.tar.gz |
Backport fix for 40.0.1 (#8603)40.0.1
* Fix handling very large pointer values (32-bit) (#8602)
* Changelog and backport fo 40.0.1
Diffstat (limited to 'src/cryptography/hazmat/backends/openssl/backend.py')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index 53e3486c0..a3fe1bce4 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -712,7 +712,7 @@ class Backend: return _X448PrivateKey(self, evp_pkey) elif key_type == self._lib.EVP_PKEY_X25519: return rust_openssl.x25519.private_key_from_ptr( - int(self._ffi.cast("intptr_t", evp_pkey)) + int(self._ffi.cast("uintptr_t", evp_pkey)) ) elif key_type == getattr(self._lib, "EVP_PKEY_ED448", None): # EVP_PKEY_ED448 is not present in CRYPTOGRAPHY_IS_LIBRESSL @@ -771,7 +771,7 @@ class Backend: return _X448PublicKey(self, evp_pkey) elif key_type == self._lib.EVP_PKEY_X25519: return rust_openssl.x25519.public_key_from_ptr( - int(self._ffi.cast("intptr_t", evp_pkey)) + int(self._ffi.cast("uintptr_t", evp_pkey)) ) elif key_type == getattr(self._lib, "EVP_PKEY_ED448", None): # EVP_PKEY_ED448 is not present in CRYPTOGRAPHY_IS_LIBRESSL |