File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
source/fundamentals/connection Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,25 @@ in the following ways:
7777 see the :manual:`SRV Connection Format </reference/connection-string/#srv-connection-format>`
7878 section in the Server manual.
7979
80+ .. note:: Workaround for an "unsafe legacy renegotiation disabled" Error
81+
82+ The {+driver-short+} depends on OpenSSL by default. Outdated SSL proxies can
83+ cause an ``unsafe legacy renegotiation disabled`` error in environments using
84+ OpenSSL 3.0 or later. You can resolve this error by setting the
85+ ``SSL_OP_LEGACY_SERVER_CONNECT`` option, as shown in the following example:
86+
87+ .. code-block:: js
88+ :emphasize-lines: 6
89+
90+ import { MongoClient } from 'mongodb';
91+ import crypto from 'crypto';
92+
93+ const client = new MongoClient("mongodb+srv://...", {
94+ secureContext: {
95+ secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT
96+ }
97+ });
98+
8099In addition to the ``tls`` client option, the driver provides more
81100options to configure TLS on your connection. For **testing purposes**,
82101you can set the ``tlsAllowInvalidHostnames``,
You can’t perform that action at this time.
0 commit comments