Skip to content

Commit

Permalink
Add ParseX509PrivateKey function doc comment
Browse files Browse the repository at this point in the history
Signed-off-by: biningo <[email protected]>
  • Loading branch information
biningo committed May 13, 2024
1 parent 0fbf511 commit 48f1db4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cloud/pkg/cloudhub/servers/httpserver/certutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func NewCertFromCa(cfg *certutil.Config, caCert *x509.Certificate, serverKey cry
return certDERBytes, nil
}

// ParseX509PrivateKey parse the private key from der format, support EC/PKCS1/PKCS8
func ParseX509PrivateKey(der []byte) (crypto.Signer, error) {
caKeyEc, ecErr := x509.ParseECPrivateKey(der)
if ecErr == nil {
Expand Down

0 comments on commit 48f1db4

Please sign in to comment.