diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2021-10-05 14:37:53 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2021-10-05 14:37:53 +0200 |
commit | afbeec8bda4255595356b08f82d7b1f966b6f588 (patch) | |
tree | 48ce07ee91e31745895f9cbfec9f0597e5ee7339 /registry/service.go | |
parent | 306fa44b7ca59282dc8695e6d169c5b25698d0cb (diff) | |
download | docker-afbeec8bda4255595356b08f82d7b1f966b6f588.tar.gz |
registry: remove tlsConfigForMirror()
This function was just a shallow wrapper around tlsConfig(), so remove
the abstraction.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'registry/service.go')
-rw-r--r-- | registry/service.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/registry/service.go b/registry/service.go index 7e55923c11..da96682302 100644 --- a/registry/service.go +++ b/registry/service.go @@ -257,7 +257,7 @@ func (s *DefaultService) TLSConfig(hostname string) (*tls.Config, error) { s.mu.Lock() defer s.mu.Unlock() - return newTLSConfig(hostname, isSecureIndex(s.config, hostname)) + return s.tlsConfig(hostname) } // tlsConfig constructs a client TLS configuration based on server defaults @@ -265,10 +265,6 @@ func (s *DefaultService) tlsConfig(hostname string) (*tls.Config, error) { return newTLSConfig(hostname, isSecureIndex(s.config, hostname)) } -func (s *DefaultService) tlsConfigForMirror(mirrorURL *url.URL) (*tls.Config, error) { - return s.tlsConfig(mirrorURL.Host) -} - // LookupPullEndpoints creates a list of v2 endpoints to try to pull from, in order of preference. // It gives preference to mirrors over the actual registry, and HTTPS over plain HTTP. func (s *DefaultService) LookupPullEndpoints(hostname string) (endpoints []APIEndpoint, err error) { |