Closed golangdaddy closed 6 years ago
Documentation error for x509.MarshalPKCS8PrivateKey...
Docs say this will marshal ecdsa.PublicKey but the author obviously meant ecdsa.PrivateKey.
ecdsa.PublicKey does not marshal:
x509: unknown key type while marshalling PKCS#8: *ecdsa.PublicKey
Change https://golang.org/cl/100839 mentions this issue: crypto/x509: clarify accepted keys for MarshalPKCS8PrivateKey
crypto/x509: clarify accepted keys for MarshalPKCS8PrivateKey
Thanks for catching that!
Documentation error for x509.MarshalPKCS8PrivateKey...
Docs say this will marshal ecdsa.PublicKey but the author obviously meant ecdsa.PrivateKey.
ecdsa.PublicKey does not marshal:
x509: unknown key type while marshalling PKCS#8: *ecdsa.PublicKey