aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-31 16:28:59 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-03-31 16:28:59 +0200
commit82d5ec96afadf1b8ba26ccdc2bc901a420c8be64 (patch)
treef94b61a3b60b01537033c107ff6601cec69cf78e
parent3979e206469607aba15a1833d6bdafd07ed00283 (diff)
Remove SNI type
-rw-r--r--server.go1
-rw-r--r--sni.go17
2 files changed, 0 insertions, 18 deletions
diff --git a/server.go b/server.go
index e021950..c2c3247 100644
--- a/server.go
+++ b/server.go
@@ -10,7 +10,6 @@ import (
type Server struct {
DataFile string
- SNI
Route
wwwServer http.Server
tlsServer http.Server
diff --git a/sni.go b/sni.go
deleted file mode 100644
index cc73fb3..0000000
--- a/sni.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package goxy
-
-import (
- "crypto/tls"
- "errors"
-)
-
-// SNI holds Certificates for Server Name Identication
-type SNI map[string]*tls.Certificate
-
-// GetCertificate returns certificate for SNI negotiation
-func (s SNI) GetCertificate(h *tls.ClientHelloInfo) (*tls.Certificate, error) {
- if crt, ok := s[h.ServerName]; ok {
- return crt, nil
- }
- return nil, errors.New("no cert for " + h.ServerName)
-}