Fix der serialization bug

This commit is contained in:
Andrew Chow 2019-01-14 16:55:38 -05:00
parent de4ff1e0fe
commit 7b9c137e60

View File

@ -187,14 +187,14 @@ def ser_sig_der(r, s):
# Make r and s as short as possible
ri = 0
for b in r:
if b == "\x00":
if b == 0:
ri += 1
else:
break
r = r[ri:]
si = 0
for b in s:
if b == "\x00":
if b == 0:
si += 1
else:
break;