diff options
author | Alex Stapleton <alexs@prol.etari.at> | 2014-06-21 13:53:31 +0100 |
---|---|---|
committer | Alex Stapleton <alexs@prol.etari.at> | 2014-06-21 15:25:45 +0100 |
commit | d1b74c473df142363f7b6c5e6fa3a2c4a10c8c40 (patch) | |
tree | 33d34429c506eaef08904a4d23177c290b93bede | |
parent | f78560233d70fe343688ad45597fcfbf96a43bd7 (diff) | |
download | cryptography-d1b74c473df142363f7b6c5e6fa3a2c4a10c8c40.tar.gz cryptography-d1b74c473df142363f7b6c5e6fa3a2c4a10c8c40.tar.bz2 cryptography-d1b74c473df142363f7b6c5e6fa3a2c4a10c8c40.zip |
Change branches for better coverage
-rw-r--r-- | cryptography/hazmat/backends/openssl/backend.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index 7f2d81db..30012e07 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -930,14 +930,17 @@ class Backend(object): if ctx == self._ffi.NULL: errors = self._consume_errors() - if curve_nid != self._lib.NID_undef: - assert errors[0] == ( + assert ( + curve_nid == self._lib.NID_undef or + errors[0] == ( self._lib.ERR_LIB_EC, self._lib.EC_F_EC_GROUP_NEW_BY_CURVE_NAME, self._lib.EC_R_UNKNOWN_GROUP ) + ) return False else: + assert curve_nid != self._lib.NID_undef self._lib.EC_GROUP_free(ctx) return True |