aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-30 10:18:08 -1000
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-30 10:18:08 -1000
commitd5fe4ba989f1c8ff5494fee3f6404a14456eac8d (patch)
tree6dad1488dbca902d26b954df057f3769c50bcb31 /src
parent94a0713e3aa1b2ec4f98fe1eb690ef2160d70fdf (diff)
downloadcryptography-d5fe4ba989f1c8ff5494fee3f6404a14456eac8d.tar.gz
cryptography-d5fe4ba989f1c8ff5494fee3f6404a14456eac8d.tar.bz2
cryptography-d5fe4ba989f1c8ff5494fee3f6404a14456eac8d.zip
assign tuple to multiple vars for better readability
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/primitives/asymmetric/utils.py8
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)