|
|
@ -17,6 +17,7 @@ |
|
|
|
package cmd |
|
|
|
package cmd |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
|
|
|
|
"bytes" |
|
|
|
"crypto" |
|
|
|
"crypto" |
|
|
|
"crypto/ecdsa" |
|
|
|
"crypto/ecdsa" |
|
|
|
"crypto/tls" |
|
|
|
"crypto/tls" |
|
|
@ -38,6 +39,9 @@ func parsePublicCertFile(certFile string) (x509Certs []*x509.Certificate, err er |
|
|
|
return nil, err |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Trimming leading and tailing white spaces.
|
|
|
|
|
|
|
|
data = bytes.TrimSpace(data) |
|
|
|
|
|
|
|
|
|
|
|
// Parse all certs in the chain.
|
|
|
|
// Parse all certs in the chain.
|
|
|
|
current := data |
|
|
|
current := data |
|
|
|
for len(current) > 0 { |
|
|
|
for len(current) > 0 { |
|
|
|