1 package main 2 3 import ( 4 "net" 5 "sync" 6 "crypto/rand" 7 "crypto/tls" 8 "log" 9 "encoding/json" 10 ) 11 12 13 func 14 main() { 15 16 cert, err := tls.LoadX509KeyPair( "OreOre.pem", "OreOre.pem" ) 17 if err != nil { log.Fatalf( "LoadX509KeyPair:%v", err ) } 18 config := &tls.Config{ 19 Certificates: []tls.Certificate{ cert }, 20 ClientAuth: tls.VerifyClientCertIfGiven, 21 Ser