Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

golang ListenAndServeTLS #64

Open
Roy20141120 opened this issue Sep 13, 2017 · 0 comments
Open

golang ListenAndServeTLS #64

Roy20141120 opened this issue Sep 13, 2017 · 0 comments

Comments

@Roy20141120
Copy link

Roy20141120 commented Sep 13, 2017

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant