Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions testcerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func genSelfSignedKeyPair(cert *x509.Certificate) (*pem.Block, *ecdsa.PrivateKey
// Create a Private Key
key, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader)
if err != nil {
return nil, nil, fmt.Errorf("could not generate rsa key - %w", err)
return nil, nil, fmt.Errorf("could not generate key - %w", err)
}

// Use CA Cert to sign and create a Public Cert
Expand All @@ -438,12 +438,12 @@ func genKeyPair(
// Create a Private Key
key, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader)
if err != nil {
return nil, nil, fmt.Errorf("could not generate rsa key - %w", err)
return nil, nil, fmt.Errorf("could not generate key - %w", err)
}

signedCert, err := x509.CreateCertificate(rand.Reader, cert, ca, &key.PublicKey, caKey)
if err != nil {
return nil, nil, fmt.Errorf("could not generate self-signed certificate - %w", err)
return nil, nil, fmt.Errorf("could not generate certificate - %w", err)
}
return certToPemBlock(signedCert), key, nil
}
Expand Down
Loading