Skip to content

Commit 47ca44e

Browse files
committed
Improve SSL testing
Remove unnecessary skipping of SSL validation Remove unnecessary setup of ServerName for server side (CN is in the cert) Signed-off-by: Alex Bligh <[email protected]>
1 parent 560bcf9 commit 47ca44e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

servertls_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func getServerConfig() *tls.Config {
2626
ClientAuth: tls.RequireAndVerifyClientCert,
2727
Certificates: []tls.Certificate{cert},
2828
ClientCAs: capool,
29-
ServerName: "dummycert1",
3029
}
3130
config.Rand = rand.Reader
3231

@@ -46,7 +45,7 @@ func getClientConfig() *tls.Config {
4645

4746
config := tls.Config{
4847
Certificates: []tls.Certificate{cert},
49-
InsecureSkipVerify: true,
48+
InsecureSkipVerify: false,
5049
ServerName: "dummycert1",
5150
RootCAs: capool,
5251
}

0 commit comments

Comments
 (0)