We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c931960 commit 92fcf93Copy full SHA for 92fcf93
scripts/bootloader/asn1parse.py
@@ -29,7 +29,7 @@ def get_ecdsa_signature(der, clength):
29
# Disable pylint error as 'input' keyword has specific handling in 'check_output'
30
# pylint: disable=unexpected-keyword-arg
31
stdout = check_output(['openssl', 'asn1parse', '-inform', 'der'], input=der)
32
- sig = b''.join([bytes.fromhex(re.search(r'(?<=\:)([0-9A-F]+)', num)[0]).ljust(clength, b'\0') \
+ sig = b''.join([bytes.fromhex(re.search(r'(?<=\:)([0-9A-F]+)', num)[0]).rjust(clength, b'\0') \
33
for num in re.findall(r'INTEGER *\:[0-9A-F]+', stdout.decode())])
34
35
assert len(sig) == 2*clength
0 commit comments