Skip to content
Snippets Groups Projects
Commit 5c7c7397 authored by Will Hunt's avatar Will Hunt
Browse files

Log SNI-less attempt for fun

parent e846b154
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,7 @@ func FederatedGet(url string, realHost string) (*http.Response, error) {
InsecureSkipVerify: true,
})
if err := conn.Handshake(); err != nil {
logrus.Warn("Handshake failed due to ", err, ". Attempting handshake without SNI.");
// ...however there are reasons for some servers NOT supplying the correct SNI, so fallback to not providing one.
conn := tls.Client(rawconn, &tls.Config{
ServerName: "", // An empty ServerName means we will not try to verify it.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment