Golang crypto/x509.VerifyOptions type example
package crypto/x509
Golang crypto/x509.VerifyOptions type usage example
certpool := x509.NewCertPool()
cert.VerifyHostname("example.com")
_, err = cert.Verify(x509.VerifyOptions{
DNSName: "example.com",
Roots: certpool,
})
Reference :
Advertisement
Something interesting
Tutorials
+22.1k Golang : Match strings by wildcard patterns with filepath.Match() function
+7.5k Golang : How to handle file size larger than available memory panic issue
+10.6k Android Studio : Simple input textbox and intercept key example
+6.7k Golang : Check if password length meet the requirement
+6.2k Golang : Calculate US Dollar Index (DXY)
+16.8k Golang : read gzipped http response
+10.6k Golang : Bubble sort example
+14.9k Golang : Basic authentication with .htpasswd file
+8.8k Golang : Accept any number of function arguments with three dots(...)
+11.7k Golang : Gorilla web tool kit secure cookie example
+11.1k Golang : How to determine a prime number?