package
1.0.1
Repository: https://github.com/nerdlem/ccheck.git
Documentation: pkg.go.dev

# Functions

Check validates the expiration dates of the given certificate, returning the relevant data.
GetValidPostgresCert connects to a SMTP server and retrieves and validates the certificate obtained through a valid protocol negotiation.
GetValidSTARTTLSCert connects to a server, determines the underlying protocol and if supported, forwards to the correct handler method.
ProcessCert takes a spec certificate specification, which might be a file containing a PEM certificate or a dial string to connect to and obtain the certificate from.
ReadFromFile reads a certificate from a local file and returns the result of processing it.
ReadSpecSliceFromFile reads a list of certificate specs from a file and returns the list of specs.

# Constants

PPG is a PostgreSQL session.
PSOCKET is a plain old TLS socket.
PSTARTTLS is a session in which STARTTLS is used to access TLS certificates.

# Variables

ErrExpired is returned when the certificate is found to be expired.
ErrFuture indicates that a certificate NotBefore date is in the future.
ErrNil is an error thrown when a nil certificate pointer is evaluated.
ErrNoCerts indicates that no certificates are available for processing with the given spec.
ErrNoPostgresTLS indicates that the PotgreSQL server did not accept our attempt to setup TLS.
ErrNoSTARTTLS indicates that the remote server does not advertise STARTTLS support.
ErrNoTLS indicates that the specified endpoint did not complete the TLS handshake.
ErrUnsupportedSTARTTLS is returned when the remote server does not speak a protocol for which we support STARTTLS.
TEHLO is the interval to wait our EHLO command to be accepted and replied to, for SMTP servers.
TGreeting is the interval to wait for the server greeting after connecting.
TNewConn is the interval to wait for a new connection to the MTA to complete.
TNOOP is the interval to wait for the NOOP command issued upon TLS to complete.
TQUIT is the interval to wait for our final QUIT command to be accepted and responded.
TSTARTTLS is the interval to wait for out STARTTLS to be accepted and responded.
TTLS is the interval to wait for TLS establishment after STARTTLS.

# Structs

Result encodes the result of validating a Certificate.

# Type aliases

Protocol is used to encode the protocol to use to get TLS certificates from the server side.