diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-01-15 21:52:08 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2019-01-15 22:52:08 -0500 |
commit | 9c2f3d6a05b117247b37323e1f8ed1cf6fa263d1 (patch) | |
tree | 13969efb771c6b57556ea8f8206ecd7a54bdaa21 /src | |
parent | 2f34994fe909d8862225c03427c7b4525fff4190 (diff) | |
download | cryptography-9c2f3d6a05b117247b37323e1f8ed1cf6fa263d1.tar.gz cryptography-9c2f3d6a05b117247b37323e1f8ed1cf6fa263d1.tar.bz2 cryptography-9c2f3d6a05b117247b37323e1f8ed1cf6fa263d1.zip |
support byteslike in X448PrivateKey.from_private_bytes (#4694)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index 89356d3c..3ab34c17 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -2150,8 +2150,9 @@ class Backend(object): return _X448PublicKey(self, evp_pkey) def x448_load_private_bytes(self, data): + data_ptr = self._ffi.from_buffer(data) evp_pkey = self._lib.EVP_PKEY_new_raw_private_key( - self._lib.NID_X448, self._ffi.NULL, data, len(data) + self._lib.NID_X448, self._ffi.NULL, data_ptr, len(data) ) self.openssl_assert(evp_pkey != self._ffi.NULL) evp_pkey = self._ffi.gc(evp_pkey, self._lib.EVP_PKEY_free) |