aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-04-14 07:25:45 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-04-14 07:25:45 -0400
commit3bf44db428e98058e29cd5e7ddd97fd5baad3dee (patch)
tree5a2258cfe1d341cbcaaa642d2f5a62357584cb72
parent5054e6591db055b520eacc39db7e5dcd6e6e3a1a (diff)
parentd914609d6cf5f40b3ec1901bbd6af13a6e6b037a (diff)
downloadcryptography-3bf44db428e98058e29cd5e7ddd97fd5baad3dee.tar.gz
cryptography-3bf44db428e98058e29cd5e7ddd97fd5baad3dee.tar.bz2
cryptography-3bf44db428e98058e29cd5e7ddd97fd5baad3dee.zip
Merge pull request #1845 from geofft/pyasn1-eoc
Fix comparison between pyasn1 objects introduced in #1843
-rw-r--r--src/cryptography/hazmat/primitives/asymmetric/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/utils.py b/src/cryptography/hazmat/primitives/asymmetric/utils.py
index f04eb66e..29390e40 100644
--- a/src/cryptography/hazmat/primitives/asymmetric/utils.py
+++ b/src/cryptography/hazmat/primitives/asymmetric/utils.py
@@ -32,7 +32,7 @@ def decode_rfc6979_signature(signature):
# pyasn1 can erroneously return this from top-level DER decoding.
# It's intended as a sentinel in recursive BER decoding, so it's
# returned even though an asn1Spec is provided.
- if data == eoo.endOfOctets:
+ if eoo.endOfOctets.isSameTypeWith(data) and data == eoo.endOfOctets:
raise ValueError("Invalid signature data. Unable to decode ASN.1")
r = int(data.getComponentByName('r'))