I am currently working on a homebrew app for the Kobo Libra H20. Whenever I try to make a web request, I get a x509 error. Something to do with certificate validation apparently.
My app is written in Go. In order to successfully make a web request, I need to do this:
Code:
func GetHttpClient() *http.Client {
transport := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
return &http.Client{
Timeout: time.Second * 5,
Transport: transport,
}
}
But this completely disables certificate validation, which makes you susceptible to man-in-the-middle attacks. So I was wondering if there is a better way to solve this issue?