From 370c4da9fe2662d07152a4b78bc09ae45f34decb Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 22 Jun 2015 23:27:15 -0500 Subject: fix ec_cdata_to_evp_pkey bug We weren't actually returning the object and the tests weren't catching it because we didn't try to use the evp_pkey property in the tests. The added test confirms it actually works. --- src/cryptography/hazmat/backends/openssl/backend.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index 2fe88327..4d469c40 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -1073,6 +1073,7 @@ class Backend(object): evp_pkey = self._ffi.gc(evp_pkey, self._lib.EVP_PKEY_free) res = self._lib.EVP_PKEY_set1_EC_KEY(evp_pkey, ec_cdata) assert res == 1 + return evp_pkey def _elliptic_curve_to_nid(self, curve): """ -- cgit v1.2.3