@@ -39,8 +39,64 @@ class SSL < Socket
3939 # connection (for non-monitoring connections) that created this socket.
4040 # @option options [ true | false ] :monitor Whether this socket was
4141 # created by a monitoring connection.
42+ # @option options [ String ] :ssl_ca_cert The file containing concatenated
43+ # certificate authority certificates used to validate certs passed from the
44+ # other end of the connection. Intermediate certificates should NOT be
45+ # specified in files referenced by this option. One of :ssl_ca_cert,
46+ # :ssl_ca_cert_string or :ssl_ca_cert_object (in order of priority) is
47+ # required when using :ssl_verify.
48+ # @option options [ Array<OpenSSL::X509::Certificate> ] :ssl_ca_cert_object
49+ # An array of OpenSSL::X509::Certificate objects representing the
50+ # certificate authority certificates used to validate certs passed from
51+ # the other end of the connection. Intermediate certificates should NOT
52+ # be specified in files referenced by this option. One of :ssl_ca_cert,
53+ # :ssl_ca_cert_string or :ssl_ca_cert_object (in order of priority)
54+ # is required when using :ssl_verify.
55+ # @option options [ String ] :ssl_ca_cert_string A string containing
56+ # certificate authority certificate used to validate certs passed from the
57+ # other end of the connection. This option allows passing only one CA
58+ # certificate to the driver. Intermediate certificates should NOT
59+ # be specified in files referenced by this option. One of :ssl_ca_cert,
60+ # :ssl_ca_cert_string or :ssl_ca_cert_object (in order of priority) is
61+ # required when using :ssl_verify.
62+ # @option options [ String ] :ssl_cert The certificate file used to identify
63+ # the connection against MongoDB. A certificate chain may be passed by
64+ # specifying the client certificate first followed by any intermediate
65+ # certificates up to the CA certificate. The file may also contain the
66+ # certificate's private key, which will be ignored. This option, if present,
67+ # takes precedence over the values of :ssl_cert_string and :ssl_cert_object
68+ # @option options [ OpenSSL::X509::Certificate ] :ssl_cert_object The OpenSSL::X509::Certificate
69+ # used to identify the connection against MongoDB. Only one certificate
70+ # may be passed through this option.
71+ # @option options [ String ] :ssl_cert_string A string containing the PEM-encoded
72+ # certificate used to identify the connection against MongoDB. A certificate
73+ # chain may be passed by specifying the client certificate first followed
74+ # by any intermediate certificates up to the CA certificate. The string
75+ # may also contain the certificate's private key, which will be ignored,
76+ # This option, if present, takes precedence over the value of :ssl_cert_object
77+ # @option options [ String ] :ssl_key The private keyfile used to identify the
78+ # connection against MongoDB. Note that even if the key is stored in the same
79+ # file as the certificate, both need to be explicitly specified. This option,
80+ # if present, takes precedence over the values of :ssl_key_string and :ssl_key_object
81+ # @option options [ OpenSSL::PKey ] :ssl_key_object The private key used to identify the
82+ # connection against MongoDB
83+ # @option options [ String ] :ssl_key_pass_phrase A passphrase for the private key.
84+ # @option options [ String ] :ssl_key_string A string containing the PEM-encoded private key
85+ # used to identify the connection against MongoDB. This parameter, if present,
86+ # takes precedence over the value of option :ssl_key_object
87+ # @option options [ true, false ] :ssl_verify Whether to perform peer certificate validation and
88+ # hostname verification. Note that the decision of whether to validate certificates will be
89+ # overridden if :ssl_verify_certificate is set, and the decision of whether to validate
90+ # hostnames will be overridden if :ssl_verify_hostname is set.
91+ # @option options [ true, false ] :ssl_verify_certificate Whether to perform peer certificate
92+ # validation. This setting overrides :ssl_verify with respect to whether certificate
93+ # validation is performed.
94+ # @option options [ true, false ] :ssl_verify_hostname Whether to perform peer hostname
95+ # validation. This setting overrides :ssl_verify with respect to whether hostname validation
96+ # is performed.
4297 #
4398 # @since 2.0.0
99+ # @api private
44100 def initialize ( host , port , host_name , timeout , family , options = { } )
45101 super ( timeout , options )
46102 @host , @port , @host_name = host , port , host_name
0 commit comments