]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/asn1schemas/cert-selfsigned-example.py
GOST PKCS#8 private keys are wrapped to OCTET STRING
[pygost.git] / pygost / asn1schemas / cert-selfsigned-example.py
index 8c589c2a22f273dec7355b9b8ec2b6d567b42fdc..9d76af87322600283da3fcb99287fdc3cd9a919d 100644 (file)
@@ -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-----")