Commit b8e45782 authored by Ahmad Hassan's avatar Ahmad Hassan

Manually load the certificates

parent 73b3da73
...@@ -66,9 +66,15 @@ module Gitlab ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment