aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.go b/main.go
index e54cd96..63df66e 100644
--- a/main.go
+++ b/main.go
@@ -30,6 +30,7 @@ type Entry struct {
}
func (r Route) SNI(h *tls.ClientHelloInfo) (*tls.Certificate, error) {
+ log.Println("request cert for", h.ServerName)
if e, ok := r[h.ServerName]; ok && e.Cert != nil {
return e.Cert, nil
}
@@ -37,6 +38,7 @@ func (r Route) SNI(h *tls.ClientHelloInfo) (*tls.Certificate, error) {
}
func (r Route) Restore() {
+ // FIXME assignment copies lock value to *mux: net/http.ServeMux contains sync.RWMutex
*mux = *http.NewServeMux()
for _, e := range route {
e.NewHandle()