acme icon indicating copy to clipboard operation
acme copied to clipboard

golang ListenAndServeTLS

Open Roy20141120 opened this issue 8 years ago • 0 comments

func main() {

	http.HandleFunc("/do", func(w http.ResponseWriter, r *http.Request) {
		fmt.Println( "do")
	})

	err := http.ListenAndServeTLS(":9000", "key.pem", "cert.pem", nil)
	if err != nil {
		panic(err)
	}
}

1# using browser open https://localhost:9000/do 2# browser remind "not safe connection:NET::ERR_CERT_AUTHORITY_INVALID" 3# how to handle this except importing the ca cert in client?

Roy20141120 avatar Sep 13 '17 11:09 Roy20141120