Fix hexadecimal master key decoding
CI / Build and push docker image (push) Successful in 3m38s
CI / Build and push OCSP image (push) Successful in 8m8s

This commit is contained in:
KCA
2026-10-25 22:17:29 +00:00
parent 830dd64012
commit 3d7967d76f
2 changed files with 16 additions and 6 deletions
@@ -553,6 +553,10 @@ class ExportImportTest(unittest.TestCase):
class CryptoTest(unittest.TestCase):
def test_decode_hex_master_key(self) -> None:
expected = bytes(range(crypto.KEY_BYTES))
self.assertEqual(crypto.decode_master_key(expected.hex()), expected)
def test_envelope(self) -> None:
master = crypto.generate_master_key()
blob = crypto.encrypt_private_key(b"secret", "key-id", crypto.decode_master_key(master))