Commit 80599d28 authored by Vincent Pelletier's avatar Vincent Pelletier

ca: Decode header before providing it to json.loads .

Consistently with how doBackup encodes the result of json.dumps .
parent 8d77af6a
Pipeline #10131 failed with stage
in 0 seconds
...@@ -894,7 +894,7 @@ class UserCertificateAuthority(CertificateAuthority): ...@@ -894,7 +894,7 @@ class UserCertificateAuthority(CertificateAuthority):
'<I', '<I',
read(struct.calcsize('<I')), read(struct.calcsize('<I')),
) )
header = json.loads(read(header_len)) header = json.loads(utils.toUnicode(read(header_len)))
symetric_cipher_name = header['cipher']['name'] symetric_cipher_name = header['cipher']['name']
try: try:
HMAC_PAYLOAD_SIZE = cls.__backup_format_dict[symetric_cipher_name] HMAC_PAYLOAD_SIZE = cls.__backup_format_dict[symetric_cipher_name]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment