From d1b74c473df142363f7b6c5e6fa3a2c4a10c8c40 Mon Sep 17 00:00:00 2001 From: Alex Stapleton Date: Sat, 21 Jun 2014 13:53:31 +0100 Subject: Change branches for better coverage --- cryptography/hazmat/backends/openssl/backend.py | 7 +++++-- 1 file 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 -- cgit v1.2.3