@@ -496,27 +496,30 @@ Ruby Options
496496 - none
497497
498498 * - ``:ssl``
499- - Tell the client to connect to the servers via SSL .
499+ - Tell the client to connect to the servers via TLS .
500500 - ``Boolean``
501501 - false
502502
503503 * - ``:ssl_ca_cert``
504- - The file path containing concatenated certificate authority certificates used to validate certs
505- passed from the other end of the connection. One of :ssl_ca_cert, :ssl_ca_cert_string or :ssl_ca_cert_object
504+ - The file path containing concatenated certificate authority certificates
505+ used to validate certs passed from the other end of the connection.
506+ One of :ssl_ca_cert, :ssl_ca_cert_string or :ssl_ca_cert_object
506507 (in order of priority) is required for :ssl_verify.
507508 - ``String``
508509 - none
509510
510511 * - ``:ssl_ca_cert_object``
511- - An array of OpenSSL::X509::Certificate representing the certificate authority certificates used to
512- validate certs passed from the other end of the connection. One of :ssl_ca_cert, :ssl_ca_cert_string or
512+ - An array of OpenSSL::X509::Certificate representing the certificate
513+ authority certificates used to validate certs passed from the other end
514+ of the connection. One of :ssl_ca_cert, :ssl_ca_cert_string or
513515 :ssl_ca_cert_object (in order of priority) is required for :ssl_verify.
514516 - ``Array< OpenSSL::X509::Certificate >``
515517 - none
516518
517519 * - ``:ssl_ca_cert_string``
518- - A string containing concatenated certificate authority certificates used to validate certs
519- passed from the other end of the connection. One of :ssl_ca_cert, :ssl_ca_cert_string or :ssl_ca_cert_object
520+ - A string containing concatenated certificate authority certificates
521+ used to validate certs passed from the other end of the connection.
522+ One of :ssl_ca_cert, :ssl_ca_cert_string or :ssl_ca_cert_object
520523 (in order of priority) is required for :ssl_verify.
521524 - ``String``
522525 - none
@@ -578,8 +581,9 @@ Ruby Options
578581 - none
579582
580583 * - ``:ssl_key_string``
581- - A string containing the PEM-encoded private key used to identify the connection against MongoDB.
582- This parameter, if present, takes precedence over the value of option :ssl_key_object.
584+ - A string containing the PEM-encoded private key used to identify the
585+ connection against MongoDB. This parameter, if present, takes precedence
586+ over the value of option :ssl_key_object.
583587 - ``String``
584588 - none
585589
@@ -594,14 +598,16 @@ Ruby Options
594598 - true
595599
596600 * - ``:ssl_verify_certificate``
597- - Whether to perform peer certificate validation. This setting overrides :ssl_verify with
598- respect to whether certificate validation is performed.
601+ - Whether to perform peer certificate validation. This setting overrides
602+ the ``:ssl_verify`` setting with respect to whether certificate
603+ validation is performed.
599604 - ``Boolean``
600605 - true
601606
602607 * - ``:ssl_verify_hostname``
603608 - Whether to perform peer hostname validation. This setting overrides
604- :ssl_verify with respect to whether hostname validation is performed.
609+ the ``:ssl_verify`` setting with respect to whether hostname validation
610+ is performed.
605611 - ``Boolean``
606612 - true
607613
@@ -811,18 +817,18 @@ URI options are explained in detail in the :manual:`Connection URI reference
811817 * - tlsAllowInvalidCertificates=Boolean
812818 - ``:ssl_verify_certificate => boolean``
813819
814- Because ``tlsAllowInvalidCertificates`` uses ``true`` to signify that verification
815- should be disabled and ``ssl_verify_certificate`` uses ``false`` to signify that
816- verification should be disabled, the boolean is inverted before being used to set
817- ``ssl_verify_certificate``.
820+ Because ``tlsAllowInvalidCertificates`` uses ``true`` to signify that
821+ verification should be disabled and ``ssl_verify_certificate`` uses
822+ ``false`` to signify that verification should be disabled, the boolean
823+ is inverted before being used to set ``ssl_verify_certificate``.
818824
819825 * - tlsAllowInvalidHostnames=Boolean
820826 - ``:ssl_verify_hostname => boolean``
821827
822- Because ``tlsAllowInvalidHostnames`` uses ``true`` to signify that verification
823- should be disabled and ``ssl_verify_hostname`` uses ``false`` to signify that
824- verification should be disabled, the boolean is inverted before being used to set
825- ``ssl_verify_hostname``.
828+ Because ``tlsAllowInvalidHostnames`` uses ``true`` to signify that
829+ verification should be disabled and ``ssl_verify_hostname`` uses
830+ ``false`` to signify that verification should be disabled, the boolean
831+ is inverted before being used to set ``ssl_verify_hostname``.
826832
827833 * - tlsCAFile=String
828834 - ``:ssl_ca_cert => String``
@@ -847,9 +853,10 @@ URI options are explained in detail in the :manual:`Connection URI reference
847853 * - tlsInsecure=Boolean
848854 - ``:ssl_verify => boolean``
849855
850- Because tlsInsecure uses ``true`` to signify that verification should be disabled and
851- ``ssl_verify`` uses ``false`` to signify that verification should be disabled, the boolean
852- is inverted before being used to set ``ssl_verify``.
856+ Because tlsInsecure uses ``true`` to signify that verification should
857+ be disabled and ``ssl_verify`` uses ``false`` to signify that
858+ verification should be disabled, the boolean is inverted before being
859+ used to set ``ssl_verify``.
853860
854861 * - w=Integer|String
855862 - ``{ :write_concern => { :w => Integer|String }}``
@@ -987,6 +994,20 @@ To connect to the MongoDB deployment using TLS:
987994
988995 When using JRuby, ECDSA certificates are not currently supported.
989996
997+ TLS vs SSL Option Names
998+ -----------------------
999+
1000+ All MongoDB server versions supported by the Ruby driver (2.6 and higher)
1001+ only implement TLS. 2.6 and higher servers do not use SSL.
1002+
1003+ For historical reasons, the Ruby option names pertaining to TLS configuration
1004+ use the ``ssl`` rather than the ``tls`` prefix. The next major version of
1005+ the Ruby driver (3.0) will use the ``tls`` prefix for Ruby option names.
1006+
1007+ The URI option names use the ``tls`` prefix, with one exception: there is
1008+ a ``ssl`` URI option that is deprecated and equivalent to the ``tls`` URI
1009+ option.
1010+
9901011Enable TLS Connections
9911012----------------------
9921013
0 commit comments