Golang crypto/x509.UnknownAuthorityError() function example
package crypto/x509
UnknownAuthorityError results when the certificate issuer is unknown
Golang crypto/x509.UnknownAuthorityError() function usage example
if innerError != nil {
switch errorType := innerError.(type) {
case x509.UnknownAuthorityError:
fmt.Println("unknown authority error")
case x509.HostnameError:
fmt.Println("hostname error")
case x509.CertificateInvalidError:
fmt.Println("invalid certificate error")
}
}
Reference :
Advertisement
Something interesting
Tutorials
+7.4k Golang : Convert source code to assembly language
+12.3k Golang : Print UTF-8 fonts on image example
+10.2k Golang : Text file editor (accept input from screen and save to file)
+13.3k Golang : Date and Time formatting
+7.1k Golang : Array mapping with Interface
+33.9k Golang : Call a function after some delay(time.Sleep and Tick)
+12.1k Golang : Perform sanity checks on filename example
+13.4k Golang : Verify token from Google Authenticator App
+18.4k Golang : How to get hour, minute, second from time?
+5.9k Golang : Use NLP to get sentences for each paragraph example
+5.9k Facebook : How to force facebook to scrape latest URL link data?
+13.2k Golang : How to calculate the distance between two coordinates using Haversine formula