diff options
-rw-r--r-- | src/cryptography/hazmat/primitives/asymmetric/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/utils.py b/src/cryptography/hazmat/primitives/asymmetric/utils.py index a1a40292..36b9080d 100644 --- a/src/cryptography/hazmat/primitives/asymmetric/utils.py +++ b/src/cryptography/hazmat/primitives/asymmetric/utils.py @@ -16,13 +16,13 @@ class _DSSSigValue(univ.Sequence): def decode_rfc6979_signature(signature): - data = decoder.decode(signature, asn1Spec=_DSSSigValue()) - if data[1]: + data, remaining = decoder.decode(signature, asn1Spec=_DSSSigValue()) + if remaining: raise ValueError( "The signature contains bytes after the end of the ASN.1 sequence." ) - r = int(data[0].getComponentByName('r')) - s = int(data[0].getComponentByName('s')) + r = int(data.getComponentByName('r')) + s = int(data.getComponentByName('s')) return (r, s) |