mirror of
https://github.com/square/certigo.git
synced 2026-10-21 06:45:42 +00:00
Print error if p12 was empty/failed to parse
This commit is contained in:
@@ -212,6 +212,9 @@ func getCerts(reader io.Reader, filename string, format string) ([]certWithAlias
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(blocks) == 0 {
|
||||
return nil, fmt.Errorf("keystore appears to be empty or password was incorrect")
|
||||
}
|
||||
for _, block := range blocks {
|
||||
if block.Type == "CERTIFICATE" {
|
||||
cert, err := x509.ParseCertificate(block.Bytes)
|
||||
|
||||
Reference in New Issue
Block a user