]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - tls/dial.go
Lowercase domain names
[tofuproxy.git] / tls / dial.go
index 2b61daca266e57b64fd427fe871ab348b9db6c23..172e3fc81cb353283dbf80ee9ffb40e7b3e3c04c 100644 (file)
@@ -1,7 +1,7 @@
 /*
 tofuproxy -- flexible HTTP/HTTPS proxy, TLS terminator, X.509 TOFU
              manager, WARC/geminispace browser
-Copyright (C) 2021-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2021-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -33,6 +33,7 @@ var sessionCache = tls.NewLRUClientSessionCache(1024)
 
 func DialTLS(ctx context.Context, network, addr string) (net.Conn, error) {
        host, _, _ := SplitHostPort(addr)
+       host = toLowerCaseASCII(host)
        ccg := ClientCertificateGetter{host: host}
        cfg := tls.Config{
                VerifyPeerCertificate: func(