aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/primitives/asymmetric
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-06-22 22:21:44 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-06-22 22:21:44 -0500
commitc952fb18053afc59104e05ea0e35c85460402d59 (patch)
treecb28359cf3d6a01fdd13bce5dfa7addb3310d556 /src/cryptography/hazmat/primitives/asymmetric
parent02a299d8b2d70e4e145fbd420787ea35873d96f7 (diff)
parent6858d62a5f85b7bf6953f75c2f618866c5407b65 (diff)
downloadcryptography-c952fb18053afc59104e05ea0e35c85460402d59.tar.gz
cryptography-c952fb18053afc59104e05ea0e35c85460402d59.tar.bz2
cryptography-c952fb18053afc59104e05ea0e35c85460402d59.zip
Merge pull request #2056 from alex/remove-workarounds
Remove our workarounds for pyasn.1 bugs, a new pyasn.1 is out!
Diffstat (limited to 'src/cryptography/hazmat/primitives/asymmetric')
-rw-r--r--src/cryptography/hazmat/primitives/asymmetric/utils.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/utils.py b/src/cryptography/hazmat/primitives/asymmetric/utils.py
index 29390e40..a03025bb 100644
--- a/src/cryptography/hazmat/primitives/asymmetric/utils.py
+++ b/src/cryptography/hazmat/primitives/asymmetric/utils.py
@@ -4,7 +4,6 @@
from __future__ import absolute_import, division, print_function
-from pyasn1.codec.ber import eoo
from pyasn1.codec.der import decoder, encoder
from pyasn1.error import PyAsn1Error
from pyasn1.type import namedtype, univ
@@ -29,11 +28,6 @@ def decode_rfc6979_signature(signature):
raise ValueError(
"The signature contains bytes after the end of the ASN.1 sequence."
)
- # 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 eoo.endOfOctets.isSameTypeWith(data) and data == eoo.endOfOctets:
- raise ValueError("Invalid signature data. Unable to decode ASN.1")
r = int(data.getComponentByName('r'))
s = int(data.getComponentByName('s'))