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
+23k Golang : Calculate time different
+9.2k Golang : Write multiple lines or divide string into multiple lines
+16.1k Golang : Generate universally unique identifier(UUID) example
+11.3k Golang : Intercept and process UNIX signals example
+19.5k Golang : How to Set or Add Header http.ResponseWriter?
+5.7k Unix/Linux/MacOSx : Get local IP address
+22.9k Golang : Gorilla mux routing example
+10.2k Golang : How to get quoted string into another string?
+21.8k Golang : Upload big file (larger than 100MB) to AWS S3 with multipart upload
+8.1k Golang : Get all countries phone codes
+13.8k Golang : Convert spaces to tabs and back to spaces example
+11.7k Golang : Calculations using complex numbers example