aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-24 00:01:32 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-03-24 00:01:32 +0100
commit04dc81bed2efa2a3c8a580d7e58b3c5be3775764 (patch)
treee33ae78a57a80152cec5873de44bc2a0b10c88ef
parentf2483c50f52762db42eec3c785b0da1353b0b0c8 (diff)
More consistent naming
-rw-r--r--main.go2
-rw-r--r--route.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 4a29e62..6c69f9e 100644
--- a/main.go
+++ b/main.go
@@ -14,7 +14,7 @@ var (
route = make(Route)
server = http.Server{
Handler: http.NewServeMux(),
- TLSConfig: &tls.Config{GetCertificate: route.SNI},
+ TLSConfig: &tls.Config{GetCertificate: route.GetCertificate},
}
)
diff --git a/route.go b/route.go
index 74062b5..c9d05e0 100644
--- a/route.go
+++ b/route.go
@@ -18,7 +18,7 @@ type Entry struct {
cert *tls.Certificate
}
-func (r Route) SNI(h *tls.ClientHelloInfo) (*tls.Certificate, error) {
+func (r Route) GetCertificate(h *tls.ClientHelloInfo) (*tls.Certificate, error) {
if e, ok := r[h.ServerName]; ok && e.cert != nil {
return e.cert, nil
}