ca/pkcs8/pkcs8.go
Function DecryptPEMBlock
has 7 return statements (exceeds 4 allowed). Open
Open
func DecryptPEMBlock(block *pem.Block, password []byte) ([]byte, error) {
der := block.Bytes
var privKey encryptedPrivateKeyInfo
if _, err := asn1.Unmarshal(der, &privKey); err != nil {
Function ConvertToECPrivateKeyPEM
has 5 return statements (exceeds 4 allowed). Open
Open
func ConvertToECPrivateKeyPEM(inPEM []byte) ([]byte, error) {
block, _ := pem.Decode(inPEM)
if block == nil {
return nil, errors.New("invalid pem bytes")
}
Function ConvertECPrivateKeyPEM
has 5 return statements (exceeds 4 allowed). Open
Open
func ConvertECPrivateKeyPEM(inPEM []byte) ([]byte, error) {
block, _ := pem.Decode(inPEM)
if block == nil {
return nil, errors.New("invalid pem bytes")
}