Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-05-28 12:46:50 +0300
committerNick Thomas <nick@gitlab.com>2019-05-28 12:46:50 +0300
commit1050f11598642b017486fc655561399d3766efb5 (patch)
treec559fced12a012af3f680512e3869b2e4454176c /helpers_test.go
parentef7fff4fa64c9cb3ca57faef3f26fa59f4f51ecb (diff)
Add config flags to specify TLS versions
Introduce two new configuration options -tls-min-version and -tls-max-version to control which TLS versions will be supported by the server. Accepted values are ssl3, tls1.0, tls1.1, tls1.2, and tls1.3. Closing https://gitlab.com/gitlab-org/gitlab-pages/issues/187
Diffstat (limited to 'helpers_test.go')
-rw-r--r--helpers_test.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/helpers_test.go b/helpers_test.go
index 2e565300..61fa5279 100644
--- a/helpers_test.go
+++ b/helpers_test.go
@@ -329,13 +329,9 @@ func GetRedirectPageWithCookie(t *testing.T, spec ListenSpec, host, urlsuffix st
return TestHTTPSClient.Transport.RoundTrip(req)
}
-func ClientWithCiphers(ciphers []uint16) (*http.Client, func()) {
- tr := &http.Transport{
- TLSClientConfig: &tls.Config{
- RootCAs: TestCertPool,
- CipherSuites: ciphers,
- },
- }
+func ClientWithConfig(tlsConfig *tls.Config) (*http.Client, func()) {
+ tlsConfig.RootCAs = TestCertPool
+ tr := &http.Transport{TLSClientConfig: tlsConfig}
client := &http.Client{Transport: tr}
return client, tr.CloseIdleConnections