(certContents []byte)
| 98 | } |
| 99 | |
| 100 | func readCert(certContents []byte) (*x509.Certificate, error) { |
| 101 | block, _ := pem.Decode(certContents) |
| 102 | if block == nil { |
| 103 | return nil, fmt.Errorf("no PEM found") |
| 104 | } else if block.Type != "CERTIFICATE" { |
| 105 | return nil, fmt.Errorf("incorrect PEM type %s", block.Type) |
| 106 | } |
| 107 | return x509.ParseCertificate(block.Bytes) |
| 108 | } |
| 109 | |
| 110 | func makeIssuer(keyFile, certFile string, alg x509.PublicKeyAlgorithm) error { |
| 111 | key, err := makeKey(keyFile, alg) |
no outgoing calls
no test coverage detected
searching dependent graphs…