const (
// _HTTP2URLBase = "https://localhost:9000"
certFile = "cert.pem"
keyFile = "cert.key"
)
func httpsSrv(mux *http.ServeMux) {
fmt.Println("httpsSrv")
srv := &http.Server{
Addr: ":6600",
ReadTimeout: 0 * time.Second,
WriteTimeout: 0 * time.Second,
Handler: mux,
}
http2.VerboseLogs = true
http2.ConfigureServer(srv, &http2.Server{})
log.Fatal(srv.ListenAndServeTLS(certFile, keyFile))
}
当开始运行这部分时会出现“TLS handshake error from 10.165.34.200:59359: remote error: tls: unknown certificate
”的问题,有哪位大佬给人指导一下,或者给一个解决此问题的思路,客户端代码正确。
有疑问加站长微信联系(非本文作者)