Versions in this module Expand all Collapse all v0 v0.3.0 Nov 12, 2026 Changes in this version + var ErrAppendRootCertificates Error = NewError("clienttls", "failed to append root certificates") + var ErrCRLExpired Error = NewError("tls", "CRL has expired") + var ErrCertificateNotCA Error = NewError("tls", "certificate is not a CA certificate") + var ErrCertificateRevoked Error = NewError("tls", "the certificate was revoked") + var ErrCertificateUnknownOCSP Error = NewError("tls", "the certificate is unknown to OCSP server") + var ErrDelegatedOCSPInvalidValidity Error = NewError("tls", "delegated OCSP responder certificate is not valid at the current time") + var ErrDelegatedOCSPMissingSigning Error = NewError("tls", ...) + var ErrIncompleteCertKeyFile Error = NewError("tls", "both CertFile and CertKeyFile must be provided") + var ErrMissingPeerCertificate Error = NewError("tls", "missing peer certificate") + var ErrNoCertificatePEMBlock Error = NewError("tls", "no PEM certificate block found in configured certificate") + var ErrNoUsableCRL Error = NewError("tls", "no usable CRL found") + var ErrOCSPResponseExpired Error = NewError("tls", "OCSP response has expired") + var ErrOCSPResponseTooOld Error = NewError("tls", "OCSP response is too old") + var ErrOCSPThisUpdateInFuture Error = NewError("tls", "OCSP response ThisUpdate is in the future") + var ErrTLSProviderRequiredHTTPS Error = NewError("mtls", "TLSProvider is required for https OCSP server") + var ErrUnableToLoadRootCert Error = NewError("clienttls", "unable to load root certificate") + var ErrUnsupportedTLSVersion Error = NewError("tls", ...) + func ConfigureClientTLS(provider ClientTLSProvider) (*tls.Config, Error) + func ConfigureServerTLS(provider ServerTLSProvider, customizers ...ServerTLSCustomizer) (*tls.Config, Error) + type ACMECertificateProvider struct + AutoCertManager *autocert.Manager + TLSMinVersion uint16 + func (p *ACMECertificateProvider) ProvideServerTLS() (*tls.Config, Error) + type ClientCertificateProvider struct + Certificate string + IncludeSystemCertificates bool + RootCertificates string + TLSMinVersion uint16 + func (p *ClientCertificateProvider) ProvideClientTLS() (*tls.Config, Error) + type ClientTLSProvider interface + ProvideClientTLS func() (*tls.Config, Error) + type MutualTLSCustomizer struct + Certificate string + func (c *MutualTLSCustomizer) ClientCertificate() (*x509.Certificate, Error) + func (c *MutualTLSCustomizer) CustomizeServerTLS(cfg *tls.Config) Error + type MutualTLSWithCRLCustomizer struct + Certificate string + Client *resty.Client + RevocationList string + TLSProvider ClientTLSProvider + Timeout time.Duration + func (m *MutualTLSWithCRLCustomizer) CustomizeServerTLS(config *tls.Config) Error + type MutualTLSWithOCSPCustomizer struct + Certificate string + Client *resty.Client + MaxResponseAge time.Duration + OCSPServer string + TLSProvider ClientTLSProvider + Timeout time.Duration + func (m *MutualTLSWithOCSPCustomizer) CustomizeServerTLS(config *tls.Config) Error + type ServerCertificateProvider struct + CertFile string + CertKeyFile string + Certificate string + TLSMinVersion uint16 + func (p *ServerCertificateProvider) ProvideServerTLS() (*tls.Config, Error) + type ServerTLSCustomizer interface + CustomizeServerTLS func(config *tls.Config) Error + type ServerTLSProvider interface + ProvideServerTLS func() (*tls.Config, Error)