Check if the server actually configured with a certificate
This commit is contained in:
parent
012910f76f
commit
7c27cd08ad
@ -65,6 +65,9 @@ func createTestServer(
|
||||
}
|
||||
|
||||
// calculate the leaf certificate's fingerprint
|
||||
if len(server.TLS.Certificates) < 1 || len(server.TLS.Certificates[0].Certificate) < 1 {
|
||||
t.Fatal("Expected server.TLS.Certificates not to be empty")
|
||||
}
|
||||
x509LeafCert := server.TLS.Certificates[0].Certificate[0]
|
||||
tpBytes := sha1.Sum(x509LeafCert)
|
||||
tpString := fmt.Sprintf("%x", tpBytes)
|
||||
|
Loading…
Reference in New Issue
Block a user