diff --git a/internal/server/cert.go b/internal/server/cert.go index 90e8b48..493a5ff 100644 --- a/internal/server/cert.go +++ b/internal/server/cert.go @@ -3,11 +3,13 @@ package server import ( "crypto/tls" "log/slog" + "net/http" "sync" ) type CertManager interface { GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error) + HTTPHandler(handler http.Handler) http.Handler } // StaticCertManager is a certificate manager that loads certificates from disk. @@ -53,3 +55,7 @@ func (m *StaticCertManager) GetCertificate(*tls.ClientHelloInfo) (*tls.Certifica return m.cert, nil } + +func (m *StaticCertManager) HTTPHandler(handler http.Handler) http.Handler { + return handler +}