upgrade
This commit is contained in:
parent
1592590883
commit
d0f7121fb1
|
@ -33,8 +33,9 @@ func main() {
|
|||
if !ok {
|
||||
log.Fatal("failed to parse root certificate")
|
||||
}
|
||||
config := &tls.Config{RootCAs: roots, ServerName: "localhost"}
|
||||
config := &tls.Config{RootCAs: roots, ServerName: "my-server"}
|
||||
|
||||
log.Printf("Trying to dial %s:%d\n", host, port)
|
||||
connp, err := net.Dial("tcp", fmt.Sprintf("%s:%d", host, port))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
|
@ -36,6 +36,7 @@ func main() {
|
|||
config := &tls.Config{Certificates: []tls.Certificate{cer}}
|
||||
//
|
||||
|
||||
log.Printf("Serving on %s:%d\n", host, port)
|
||||
l, err := tls.Listen("tcp", fmt.Sprintf("%s:%d", host, port), config)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
Loading…
Reference in New Issue
Block a user