- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for parseECPrivateKey (0.64 sec)
-
security/pkg/pki/util/crypto.go
kb, _ := pem.Decode(keyBytes) if kb == nil { return nil, fmt.Errorf("invalid PEM-encoded key") } switch kb.Type { case blockTypeECPrivateKey: key, err := x509.ParseECPrivateKey(kb.Bytes) if err != nil { return nil, fmt.Errorf("failed to parse the ECDSA private key: %v", err) } return key, nil case blockTypeRSAPrivateKey: key, err := x509.ParsePKCS1PrivateKey(kb.Bytes)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jun 04 13:00:07 UTC 2024 - 5.3K bytes - Viewed (0) -
src/crypto/tls/tls.go
case *rsa.PrivateKey, *ecdsa.PrivateKey, ed25519.PrivateKey: return key, nil default: return nil, errors.New("tls: found unknown private key type in PKCS#8 wrapping") } } if key, err := x509.ParseECPrivateKey(der); err == nil { return key, nil } return nil, errors.New("tls: failed to parse private key")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 12.2K bytes - Viewed (0)