Manually load the certificates
This commit is contained in:
parent
73b3da73d6
commit
b8e457827e
|
@ -66,9 +66,15 @@ module Gitlab
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.load_certs
|
||||||
|
@certs ||= Dir["#{OpenSSL::X509::DEFAULT_CERT_DIR}/*"].map do |cert|
|
||||||
|
File.read(cert)
|
||||||
|
end.join("\n")
|
||||||
|
end
|
||||||
|
|
||||||
def self.stub_creds(storage)
|
def self.stub_creds(storage)
|
||||||
if URI(address(storage)).scheme == 'tls'
|
if URI(address(storage)).scheme == 'tls'
|
||||||
GRPC::Core::ChannelCredentials.new
|
GRPC::Core::ChannelCredentials.new load_certs
|
||||||
else
|
else
|
||||||
:this_channel_is_insecure
|
:this_channel_is_insecure
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue