Removes unnecessary encoding when unhexlifying

binascii.unhexlify(x) is equal to binascii.unhexlify(x.encode())
This commit is contained in:
Sergi Delgado Segura
2019-12-17 11:35:28 +01:00
parent 1184b4648a
commit 46a7fa824f
3 changed files with 4 additions and 4 deletions

View File

@@ -335,7 +335,7 @@ class Inspector:
rcode = errors.APPOINTMENT_EMPTY_FIELD
message = "empty signature received"
pk = Cryptographer.load_public_key_der(unhexlify(pk_der.encode("utf-8")))
pk = Cryptographer.load_public_key_der(unhexlify(pk_der))
valid_sig = Cryptographer.verify(Cryptographer.signature_format(appointment), signature, pk)
if not valid_sig: