Go
Go
Example: Http.GetServerCert method
Demonstrates how to call the GetServerCert method.Chilkat Go Downloads
success := false
http := chilkat.NewHttp()
cert := chilkat.NewCert()
success = http.GetServerCert("chilkatsoft.com",443,cert)
if success == false {
fmt.Println(http.LastErrorText())
http.DisposeHttp()
cert.DisposeCert()
return
}
fmt.Println(cert.SubjectDN())
fmt.Println(cert.ValidToStr())
// Output:
// CN=*.chilkatsoft.com
// Wed, 10 Jun 2026 23:59:59 GMT
http.DisposeHttp()
cert.DisposeCert()