Commit 8d77af6a authored by Vincent Pelletier's avatar Vincent Pelletier

ca: Avoid duplicating _BACKUP_MAGIC length definition.

parent 34113c92
......@@ -887,7 +887,7 @@ class UserCertificateAuthority(CertificateAuthority):
Restore backup, revoke certificate corresponding to private key and sign
its renewal.
"""
magic = read(8)
magic = read(len(_BACKUP_MAGIC))
if magic != _BACKUP_MAGIC:
raise ValueError('Invalid backup magic string')
header_len, = struct.unpack(
......
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