Files
codeql/go/ql/test/query-tests/Security/CWE-295/DisabledCertificateCheck/DisabledCertificateCheck.go
2022-05-20 10:07:19 -07:00

16 lines
285 B
Go

package main
import (
"crypto/tls"
"net/http"
)
func doAuthReq(authReq *http.Request) *http.Response {
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // NOT OK
}
client := &http.Client{Transport: tr}
res, _ := client.Do(authReq)
return res
}