diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2018-11-22 21:02:05 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-11-23 11:02:05 +0800 |
commit | 8ec59bef65914d340b19106068a2063a60b12139 (patch) | |
tree | cae50becf866c33e4284cce318e03b206e16cda0 | |
parent | 6f88e01af8f5d6db7082d155f3faf88dfb48e864 (diff) | |
download | cryptography-8ec59bef65914d340b19106068a2063a60b12139.tar.gz cryptography-8ec59bef65914d340b19106068a2063a60b12139.tar.bz2 cryptography-8ec59bef65914d340b19106068a2063a60b12139.zip |
Added comments reminding us to improve this code when we go 1.1.1+ only (#4605)
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index f0b09dac..c8a46b98 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -2030,6 +2030,8 @@ class Backend(object): return self._ffi.buffer(pp[0], res)[:] def x25519_load_public_bytes(self, data): + # When we drop support for CRYPTOGRAPHY_OPENSSL_LESS_THAN_111 we can + # switch this to EVP_PKEY_new_raw_public_key evp_pkey = self._create_evp_pkey_gc() res = self._lib.EVP_PKEY_set_type(evp_pkey, self._lib.NID_X25519) backend.openssl_assert(res == 1) @@ -2040,6 +2042,8 @@ class Backend(object): return _X25519PublicKey(self, evp_pkey) def x25519_load_private_bytes(self, data): + # When we drop support for CRYPTOGRAPHY_OPENSSL_LESS_THAN_111 we can + # switch this to EVP_PKEY_new_raw_private_key # OpenSSL only has facilities for loading PKCS8 formatted private # keys using the algorithm identifiers specified in # https://tools.ietf.org/html/draft-ietf-curdle-pkix-09. |