From 64dbb3eecb4e1127b8c128292430b1254359151b Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Fri, 19 Feb 2021 18:53:06 -0500 Subject: [PATCH] server: Clarify GetCertificate documentation --- server.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 44cfd98..bb2f457 100644 --- a/server.go +++ b/server.go @@ -35,8 +35,11 @@ type Server struct { // A WriteTimeout of zero means no timeout. WriteTimeout time.Duration - // GetCertificate, if not nil, will be called to retrieve a new certificate - // if the current one is expired or missing. + // GetCertificate returns a TLS certificate based on the given + // hostname. + // + // If GetCertificate is nil or returns nil, then no certificate + // will be used and the connection will be aborted. GetCertificate func(hostname string) (*tls.Certificate, error) // ErrorLog specifies an optional logger for errors accepting connections,