From: Sergey Matveev Date: Mon, 18 Jan 2021 15:45:04 +0000 (+0300) Subject: GOST PKCS#8 private keys are wrapped to OCTET STRING X-Git-Tag: 5.3~7 X-Git-Url: http://www.git.cypherpunks.ru/?p=pygost.git;a=commitdiff_plain;h=6650aa37ce30a08be41c148cbd7b7b6beba49ecc GOST PKCS#8 private keys are wrapped to OCTET STRING --- diff --git a/pygost/asn1schemas/cert-selfsigned-example.py b/pygost/asn1schemas/cert-selfsigned-example.py index 8c589c2..9d76af8 100644 --- a/pygost/asn1schemas/cert-selfsigned-example.py +++ b/pygost/asn1schemas/cert-selfsigned-example.py @@ -153,7 +153,7 @@ print(pem(PrivateKeyInfo(( ("algorithm", ai["key_algorithm"]), ("parameters", Any(key_params)), ))), - ("privateKey", PrivateKey(prv_raw)), + ("privateKey", PrivateKey(OctetString(prv_raw).encode())), )))) print("-----END PRIVATE KEY-----")