Documentation ¶
Overview ¶
Package certificate contains functions for handling TLS certificates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchPEM ¶
FetchPEM retrieves the certificate chain presented by the server listening at hostname in PEM format.
Adapted from https://stackoverflow.com/a/46735876/491710
func LoadPEM ¶
LoadPEM loads certificates from a PEM file and returns a cert pool containing the certificates.
func ValidateConnection ¶
ValidateConnection checks that a connection can be successfully established to the server URL using the cert pool provided. The validation performed is not sufficient to verify authenticity of the server, but it can help to catch certificate errors and provide more detailed messages to users.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.