aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cryptography/hazmat/backends/openssl/ec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/ec.py b/src/cryptography/hazmat/backends/openssl/ec.py
index 16df37af..aa4a7a35 100644
--- a/src/cryptography/hazmat/backends/openssl/ec.py
+++ b/src/cryptography/hazmat/backends/openssl/ec.py
@@ -182,7 +182,7 @@ class _EllipticCurvePrivateKey(object):
_Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM
)
- if type(peer_public_key.curve) is not type(self.curve):
+ if peer_public_key.curve.name != self.curve.name:
raise ValueError(
"peer_public_key and self are not on the same curve"
)