Signatures need to use UTF-8 in order to represent all URLs (#633)

This commit is contained in:
Osma Ahvenlampi 2023-08-21 05:24:47 +03:00 committed by GitHub
parent 70b9e3b900
commit 2a50928f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ class HttpSignature:
try:
public_key_instance.verify(
signature,
cleartext.encode("ascii"),
cleartext.encode("utf8"),
padding.PKCS1v15(),
hashes.SHA256(),
)
@ -229,7 +229,7 @@ class HttpSignature:
),
)
signature = private_key_instance.sign(
signed_string.encode("ascii"),
signed_string.encode("utf8"),
padding.PKCS1v15(),
hashes.SHA256(),
)