- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for parseECPrivateKey (0.25 sec)
-
src/crypto/x509/sec1.go
PublicKey asn1.BitString `asn1:"optional,explicit,tag:1"` } // ParseECPrivateKey parses an EC private key in SEC 1, ASN.1 DER form. // // This kind of key is commonly encoded in PEM blocks of type "EC PRIVATE KEY". func ParseECPrivateKey(der []byte) (*ecdsa.PrivateKey, error) { return parseECPrivateKey(nil, der) } // MarshalECPrivateKey converts an EC private key to SEC 1, ASN.1 DER form. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 4.6K bytes - Viewed (0) -
src/crypto/x509/pkcs8.go
var privKey pkcs8 if _, err := asn1.Unmarshal(der, &privKey); err != nil { if _, err := asn1.Unmarshal(der, &ecPrivateKey{}); err == nil { return nil, errors.New("x509: failed to parse private key (use ParseECPrivateKey instead for this key format)") } if _, err := asn1.Unmarshal(der, &pkcs1PrivateKey{}); err == nil { return nil, errors.New("x509: failed to parse private key (use ParsePKCS1PrivateKey instead for this key format)")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 5.8K bytes - Viewed (0) -
src/crypto/tls/handshake_test.go
9d611cfdd6d87cd5aea45aa30a2082e8b51e94c2f3dd5d5c6036a8a615ed0240143993d80ece56f877cb80048335701eb0e608cc0c1ca8c2227b52edf8f1ac99c562f2541b5ce81f0515af1c5b4770dba53383964b4b725ff46fdec3d08907df")) var testECDSAPrivateKey, _ = x509.ParseECPrivateKey(fromHex("3081dc0201010442019883e909ad0ac9ea3d33f9eae661f1785206970f8ca9a91672f1eedca7a8ef12bd6561bb246dda5df4b4d5e7e3a92649bc5d83a0bf92972e00e62067d0c7bd99d7a00706052b81040023a18189038186000400c4a1edbe98f90b4873367ec316561122f23d53c33b4d213d...
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 24.5K bytes - Viewed (0) -
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/x509/pkcs1.go
return nil, asn1.SyntaxError{Msg: "trailing data"} } if err != nil { if _, err := asn1.Unmarshal(der, &ecPrivateKey{}); err == nil { return nil, errors.New("x509: failed to parse private key (use ParseECPrivateKey instead for this key format)") } if _, err := asn1.Unmarshal(der, &pkcs8{}); err == nil { return nil, errors.New("x509: failed to parse private key (use ParsePKCS8PrivateKey instead for this key format)") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 4.7K bytes - Viewed (0) -
src/crypto/x509/platform_test.go
t.Fatalf("failed to parse test root: %s", err) } der, err = os.ReadFile(rootKeyPath) if err != nil { t.Fatalf("failed to read test key: %s", err) } b, _ = pem.Decode(der) testRootKey, err := ParseECPrivateKey(b.Bytes) if err != nil { t.Fatalf("failed to parse test key: %s", err) } if _, err := testRoot.Verify(VerifyOptions{}); err != nil { t.Skipf("test root is not in trust store, skipping (err: %q)", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 17:18:29 UTC 2024 - 7.2K 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) -
staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc_test.go
key, err := x509.ParseECPrivateKey(b) if err != nil { return nil, err } return key.Public(), nil }) } func loadECDSAPrivKey(t *testing.T, filepath string, alg jose.SignatureAlgorithm) *jose.JSONWebKey { return loadKey(t, filepath, alg, func(b []byte) (interface{}, error) { return x509.ParseECPrivateKey(b) }) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 97.7K bytes - Viewed (0) -
src/crypto/x509/x509_test.go
hexKey string errorContains string }{ {hexKey: hexPKCS1TestPKCS8Key, errorContains: "use ParsePKCS8PrivateKey instead"}, {hexKey: hexPKCS1TestECKey, errorContains: "use ParseECPrivateKey instead"}, } func TestPKCS1MismatchKeyFormat(t *testing.T) { for i, test := range pkcs1MismatchKeyTests { derBytes, _ := hex.DecodeString(test.hexKey) _, err := ParsePKCS1PrivateKey(derBytes)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:00:16 UTC 2024 - 163.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"PEMCipherDES", Const, 1}, {"ParseCRL", Func, 0}, {"ParseCertificate", Func, 0}, {"ParseCertificateRequest", Func, 3}, {"ParseCertificates", Func, 0}, {"ParseDERCRL", Func, 0}, {"ParseECPrivateKey", Func, 1}, {"ParsePKCS1PrivateKey", Func, 0}, {"ParsePKCS1PublicKey", Func, 10}, {"ParsePKCS8PrivateKey", Func, 0}, {"ParsePKIXPublicKey", Func, 0}, {"ParseRevocationList", Func, 19},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)