Versions in this module Expand all Collapse all v0 v0.2.0 Jun 17, 2024 v0.1.0 Mar 2, 2024 Changes in this version + const MAX_CONTENT_LEN + var ErrEst = errors.New("base EstError") + func ApplyTlsCertHandler(tlsConfig *tls.Config, handler TlsCertHandler) error + func CtxGetLog(ctx context.Context) zerolog.Logger + func CtxWithLog(ctx context.Context, log zerolog.Logger) context.Context + func InitLogger(level string) zerolog.Logger + func RegisterEchoHandlers(svcHandler ServiceHandler, e *echo.Echo) + func RunGracefully(ctx context.Context, server *http.Server, e *echo.Echo) error + type EstErrorType int + const ErrInvalidBase64 + const ErrInvalidCsr + const ErrInvalidCsrSignature + const ErrInvalidSignatureAlgorithm + const ErrSubjectAltNameMismatch + const ErrSubjectMismatch + func (e EstErrorType) Error() string + func (e EstErrorType) Unwrap() error + type Service struct + func NewService(rootCa *x509.Certificate, ca *x509.Certificate, key crypto.Signer, ...) Service + func (s Service) CaCerts(ctx context.Context) ([]byte, error) + func (s Service) Enroll(ctx context.Context, csrBytes []byte) ([]byte, error) + func (s Service) ReEnroll(ctx context.Context, csrBytes []byte, curCert *x509.Certificate) ([]byte, error) + type ServiceHandler interface + GetService func(ctx context.Context, serverName string) (Service, error) + func NewStaticServiceHandler(svc Service) ServiceHandler + type TlsCertHandler interface + Get func(ctx context.Context, serverName string) (*TlsCerts, error) + Init func(ctx context.Context) error + VerifyConnection func(ctx context.Context, certs *TlsCerts, conn tls.ConnectionState) error + func NewStaticTlsCertHandler(certs *TlsCerts) (TlsCertHandler, error) + type TlsCerts struct + Roots *x509.CertPool + Server *tls.Certificate