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
+19.1k Golang : When to use public and private identifier(variable) and how to make the identifier public or private?
+9.4k Golang : Web(Javascript) to server-side websocket example
+19.2k Golang : Check if directory exist and create if does not exist
+10.4k Golang : Meaning of omitempty in struct's field tag
+21.6k Golang : GORM create record or insert new record into database example
+9k Golang : Capture text return from exec function example
+5.3k Javascript : Shuffle or randomize array example
+6.7k Golang : Experimental emojis or emoticons icons programming language
+6.8k Golang : Join lines with certain suffix symbol example
+9.2k Golang : does not implement flag.Value (missing Set method)
+5.6k PHP : Convert string to timestamp or datestamp before storing to database(MariaDB/MySQL)