]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - tls.go
Another spy
[tofuproxy.git] / tls.go
diff --git a/tls.go b/tls.go
index ef43964c83eb4b475c90b3602e1b775ab00142a4..a1283c5771c54964cd40a008e9784b8d9709552d 100644 (file)
--- a/tls.go
+++ b/tls.go
@@ -34,7 +34,6 @@ var (
        TLSNextProtoS = make(map[string]func(*http.Server, *tls.Conn, http.Handler))
        CACert        *x509.Certificate
        CAPrv         crypto.PrivateKey
-       sessionCache  = tls.NewLRUClientSessionCache(1024)
 )
 
 type Handler struct{}
@@ -61,7 +60,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
        hostCertsM.Lock()
        keypair, ok := hostCerts[host]
        if !ok || !keypair.cert.NotAfter.After(time.Now().Add(time.Hour)) {
-               keypair = newKeypair(host, CACert, CAPrv)
+               keypair = newX509Keypair(host, CACert, CAPrv)
                hostCerts[host] = keypair
        }
        hostCertsM.Unlock()