proposal: crypto/x509: create typed versions of ParsePKCS8PrivateKey #26485
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Proposal
Proposal-Crypto
Proposal related to crypto packages or other security issues
Milestone
It bothers me that me as an end-user of
ParsePKCS8PrivateKey
have to do type assertion logic on the key even when you know what you expect.We should utilize Go's strong type system to create type-specific functions called for example
ParsePKCS8PrivateKeyRSA(der []byte) (key *rsa.PrivateKey, err error)
ParsePKCS8PrivateKeyECDSA(der []byte) (key *ecdsa.PrivateKey, err error)
The text was updated successfully, but these errors were encountered: