adding vendor folder

This commit is contained in:
evilsocket 2018-03-23 15:25:11 +01:00
commit c304ca4696
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
1145 changed files with 369961 additions and 2 deletions

39
vendor/github.com/inconshreveable/go-vhost/tls_test.go generated vendored Normal file
View file

@ -0,0 +1,39 @@
package vhost
import (
"crypto/tls"
"net"
"testing"
)
func TestSNI(t *testing.T) {
var testHostname string = "foo.example.com"
l, err := net.Listen("tcp", "127.0.0.1:12345")
if err != nil {
panic(err)
}
defer l.Close()
go func() {
conf := &tls.Config{ServerName: testHostname}
conn, err := tls.Dial("tcp", "127.0.0.1:12345", conf)
if err != nil {
panic(err)
}
conn.Close()
}()
conn, err := l.Accept()
if err != nil {
panic(err)
}
c, err := TLS(conn)
if err != nil {
panic(err)
}
if c.Host() != testHostname {
t.Errorf("Connection Host() is %s, expected %s", c.Host(), testHostname)
}
}