7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/legion/transport/connection/ssl.rb', line 7
def tls_options(tls_config: nil, port: nil)
if defined?(Legion::Crypt::TLS)
tls_config ||= tls_settings
port ||= transport_port
tls = Legion::Crypt::TLS.resolve(tls_config, port: port)
return {} unless tls[:enabled]
Legion::Logging.info '[Transport] TLS enabled for RabbitMQ connection' if defined?(Legion::Logging)
return {
tls: true,
tls_cert: tls[:cert],
tls_key: tls[:key],
tls_ca_certificates: [tls[:ca]].compact,
verify_peer: tls[:verify] != :none
}
end
direct_tls_options
end
|