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.6k Generate checksum for a file in Go
+14.3k Golang : Get uploaded file name or access uploaded files
+6.1k Golang : Missing Subversion command
+15.2k Golang : Accurate and reliable decimal calculations
+12.1k Golang : convert(cast) string to integer value
+32.4k Golang : Math pow(the power of x^y) example
+9.4k Golang : Timeout example
+16.6k Golang : Merge video(OpenCV) and audio(PortAudio) into a mp4 file
+6.4k Golang : Break string into a slice of characters example
+5.3k Python : Convert(cast) string to bytes example
+13.5k Golang : Count number of runes in string
+21.2k Golang : Get password from console input without echo or masked