We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1577eb1 commit 979a1d5Copy full SHA for 979a1d5
internal/cert/helper.go
@@ -27,7 +27,12 @@ func IsPrivateKey(pemStr string) bool {
27
}
28
29
_, errECDSA := x509.ParseECPrivateKey(block.Bytes)
30
- return errECDSA == nil
+ if errECDSA == nil {
31
+ return true
32
+ }
33
+
34
+ _, errPKC := x509.ParsePKCS8PrivateKey(block.Bytes)
35
+ return errPKC == nil
36
37
38
// IsCertificatePath checks if the file at the given path is a certificate or not exists.
0 commit comments