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
+9.4k Golang : Timeout example
+5.6k Golang : Configure crontab to poll every two minutes 8am to 6pm Monday to Friday
+7.5k Golang : Detect sample rate, channels or latency with PortAudio
+5.4k Gogland : Datasource explorer
+5.7k Golang : ROT32768 (rotate by 0x80) UTF-8 strings example
+8.5k Golang : How to check if input string is a word?
+19.9k Golang : Accept input from user with fmt.Scanf skipped white spaces and how to fix it
+7.8k Golang : Reverse a string with unicode
+5.7k Get website traffic ranking with Similar Web or Alexa
+18.6k Golang : Get download file size
+12.4k Golang : Extract part of string with regular expression
+8.6k Golang : Convert(cast) []byte to io.Reader type