crypto: document error behavior for Signer.PublicKey & Decrypter.PublicKey #30510
Labels
Documentation
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
crypto.Decrypter and the similar crypto.Signer both define
PublicKey()
methods which are supposed to return the public key corresponding to the private key used for decryption/signing.An implementation of
PublicKey()
that supports nShield HSMs may fail for a couple of reasons:With this in mind my requests are:
PublicKey()
should do when an error occurs. Returningnil
or panicing with an informative message seem like the likely options.error
return value toPublicKey()
.The text was updated successfully, but these errors were encountered: