summaryrefslogtreecommitdiffhomepage
path: root/caddytls/handshake_test.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2018-03-17 17:05:30 -0600
committerMatthew Holt <[email protected]>2018-03-17 17:05:30 -0600
commitef40659c7047978f8f5150d94a3139021e0ad173 (patch)
tree661375609c13179fde9fa04936222d52dbca4672 /caddytls/handshake_test.go
parent3afb1ae380e7405e58c6166d98dc30ef54e73e14 (diff)
parent6e2de19d9fc29f8dec059c5345819a68a13832f2 (diff)
downloadcaddy-ef40659c7047978f8f5150d94a3139021e0ad173.tar.gz
caddy-ef40659c7047978f8f5150d94a3139021e0ad173.zip
Merge branch 'master' into acmev2
Diffstat (limited to 'caddytls/handshake_test.go')
-rw-r--r--caddytls/handshake_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/caddytls/handshake_test.go b/caddytls/handshake_test.go
index f0b8f7be2..bf427d245 100644
--- a/caddytls/handshake_test.go
+++ b/caddytls/handshake_test.go
@@ -27,7 +27,7 @@ func TestGetCertificate(t *testing.T) {
hello := &tls.ClientHelloInfo{ServerName: "example.com"}
helloSub := &tls.ClientHelloInfo{ServerName: "sub.example.com"}
helloNoSNI := &tls.ClientHelloInfo{}
- helloNoMatch := &tls.ClientHelloInfo{ServerName: "nomatch"}
+ // helloNoMatch := &tls.ClientHelloInfo{ServerName: "nomatch"} // TODO (see below)
// When cache is empty
if cert, err := cfg.GetCertificate(hello); err == nil {
@@ -69,8 +69,9 @@ func TestGetCertificate(t *testing.T) {
t.Errorf("Expected random cert with no matches, got: %v", cert)
}
+ // TODO: Re-implement this behavior (it was reverted in #2037)
// When no certificate matches, raise an alert
- if _, err := cfg.GetCertificate(helloNoMatch); err == nil {
- t.Errorf("Expected an error when no certificate matched the SNI, got: %v", err)
- }
+ // if _, err := cfg.GetCertificate(helloNoMatch); err == nil {
+ // t.Errorf("Expected an error when no certificate matched the SNI, got: %v", err)
+ // }
}