You've already forked ssl_exporter
mirror of
https://github.com/ribbybibby/ssl_exporter.git
synced 2025-06-30 23:23:47 +02:00
Fix private key decryption in tests
This commit is contained in:
@ -31,9 +31,11 @@ func TestProbeHandler(t *testing.T) {
|
|||||||
t.Fatalf("Issue decrypting test client key")
|
t.Fatalf("Issue decrypting test client key")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
keyContent = pem.EncodeToMemory(&pem.Block{Type: keyBlock.Type, Bytes: keyBlockDecrypted})
|
||||||
|
|
||||||
emptyRootCAs := x509.NewCertPool()
|
emptyRootCAs := x509.NewCertPool()
|
||||||
|
|
||||||
certificate, _ := tls.X509KeyPair(certContent, keyBlockDecrypted)
|
certificate, err := tls.X509KeyPair(certContent, keyContent)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf(err.Error())
|
t.Fatalf(err.Error())
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user