Method: Mongo.tls_context_hooks

Defined in:
lib/mongo.rb

.tls_context_hooksArray<Proc>

This is a user-settable list of hooks that will be invoked when any new TLS socket is connected. Each hook should be a Proc that takes an OpenSSL::SSL::SSLContext object as an argument. These hooks can be used to modify the TLS context (for example to disallow certain ciphers).

Returns:

  • (Array<Proc>)

    The list of procs to be invoked when a TLS socket is connected (may be an empty Array).



120
121
122
# File 'lib/mongo.rb', line 120

module_function def tls_context_hooks
  @tls_context_hooks ||= []
end