diff options
author | Balasankar "Balu" C <balasankarc@autistici.org> | 2021-03-03 15:46:20 +0300 |
---|---|---|
committer | Balasankar "Balu" C <balasankarc@autistici.org> | 2021-03-04 06:29:25 +0300 |
commit | 3a1484281a9e4fd7c1af4cdda1f850c391eadc09 (patch) | |
tree | 89c6c35b6281f8c7b0625d70955476193768fed7 /app.go | |
parent | 47c286fcfac10fe5d1b2af17caabbec2b799740d (diff) |
Move tlsconfig package to be a nested package under config
Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,7 +1,7 @@ package main import ( - "crypto/tls" + cryptotls "crypto/tls" "errors" "fmt" "net" @@ -24,6 +24,7 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/artifact" "gitlab.com/gitlab-org/gitlab-pages/internal/auth" cfg "gitlab.com/gitlab-org/gitlab-pages/internal/config" + "gitlab.com/gitlab-org/gitlab-pages/internal/config/tls" "gitlab.com/gitlab-org/gitlab-pages/internal/domain" "gitlab.com/gitlab-org/gitlab-pages/internal/handlers" "gitlab.com/gitlab-org/gitlab-pages/internal/httperrors" @@ -34,7 +35,6 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/request" "gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk/zip" "gitlab.com/gitlab-org/gitlab-pages/internal/source" - "gitlab.com/gitlab-org/gitlab-pages/internal/tlsconfig" "gitlab.com/gitlab-org/gitlab-pages/metrics" ) @@ -60,7 +60,7 @@ func (a *theApp) isReady() bool { return a.domains.IsReady() } -func (a *theApp) ServeTLS(ch *tls.ClientHelloInfo) (*tls.Certificate, error) { +func (a *theApp) ServeTLS(ch *cryptotls.ClientHelloInfo) (*cryptotls.Certificate, error) { if ch.ServerName == "" { return nil, nil } @@ -546,7 +546,7 @@ func fatal(err error, message string) { log.WithError(err).Fatal(message) } -func (a *theApp) TLSConfig() (*tls.Config, error) { - return tlsconfig.Create(a.config.General.RootCertificate, a.config.General.RootKey, a.ServeTLS, +func (a *theApp) TLSConfig() (*cryptotls.Config, error) { + return tls.Create(a.config.General.RootCertificate, a.config.General.RootKey, a.ServeTLS, a.config.General.InsecureCiphers, a.config.TLS.MinVersion, a.config.TLS.MaxVersion) } |