diff options
Diffstat (limited to 'src/cryptography/hazmat/primitives/asymmetric/utils.py')
-rw-r--r-- | src/cryptography/hazmat/primitives/asymmetric/utils.py | 2 |
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')) |