File: asn1-decoding.patch

package info (click to toggle)
python-crypto 2.6.1-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 2,984 kB
  • sloc: ansic: 12,455; python: 10,473; sh: 41; makefile: 16
file content (27 lines) | stat: -rw-r--r-- 1,148 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Fix TypeError in ASN1 implementation
Author: Stefanos Harhalakis <v13@v13.gr>
Last-Update: 2014-05-10
Forwarded: not-needed
Bug-Debian: https://bugs.debian.org/746180

diff -Nur python-crypto-2.6.1.orig/lib/Crypto/Util/asn1.py python-crypto-2.6.1/lib/Crypto/Util/asn1.py
--- python-crypto-2.6.1.orig/lib/Crypto/Util/asn1.py	2013-10-14 22:38:10.000000000 +0100
+++ python-crypto-2.6.1/lib/Crypto/Util/asn1.py	2014-04-27 19:27:11.602641108 +0100
@@ -257,7 +257,7 @@
         self.payload = value
 
     def decode(self, derEle, noLeftOvers=0):
-        p = DerObject.decode(derEle, noLeftOvers)
+        p = DerObject.decode(self, derEle, noLeftOvers)
         if not self.isType("OCTET STRING"):
             raise ValueError("Not a valid OCTET STRING.")
         return p
@@ -271,7 +271,7 @@
         DerObject.__init__(self, 'OBJECT IDENTIFIER')
 
     def decode(self, derEle, noLeftOvers=0):
-        p = DerObject.decode(derEle, noLeftOvers)
+        p = DerObject.decode(self, derEle, noLeftOvers)
         if not self.isType("OBJECT IDENTIFIER"):
             raise ValueError("Not a valid OBJECT IDENTIFIER.")
         return p