From 65feb471cadf00a2f505864f1d366b33107d6f02 Mon Sep 17 00:00:00 2001 From: Alex Stapleton Date: Sat, 21 Jun 2014 15:31:43 +0100 Subject: Check the error code properly --- cryptography/hazmat/backends/openssl/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index 30012e07..bd6cc20a 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -932,7 +932,7 @@ class Backend(object): errors = self._consume_errors() assert ( curve_nid == self._lib.NID_undef or - errors[0] == ( + errors[0][1:] == ( self._lib.ERR_LIB_EC, self._lib.EC_F_EC_GROUP_NEW_BY_CURVE_NAME, self._lib.EC_R_UNKNOWN_GROUP -- cgit v1.2.3