@@ -134,14 +134,16 @@ message:
134
134
135
135
MongoServerSelectionError: 886E0000 :error:0A000152 :SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:c:\ws\deps\openssl\openssl\ssl\statem\extensions.c:922:
136
136
137
- These types of errors occur due to outdated or buggy SSL proxies that mistakenly
137
+ These types of errors occur because of outdated or buggy SSL proxies that mistakenly
138
138
enforce legacy `TLS renegotiation <https://www.ibm.com/docs/en/i/7.3?topic=settings-renegotiation >`__.
139
139
140
- To resolve this issue, use the ``UnsafeLegacyServerConnect `` option with the
141
- ``OPENSSL_CONF `` environment variable. Create a configuration
142
- file with the following content:
140
+ To resolve this issue, create a configuration file that includes the
141
+ ``UnsafeLegacyServerConnect `` option. This option requires OpenSSL v3.0.4 or
142
+ greater. The following example shows how to set the ``UnsafeLegacyServerConnect ``
143
+ option:
143
144
144
145
.. code-block :: shell
146
+ :emphasize-lines: 10
145
147
146
148
openssl_conf = openssl_init
147
149
@@ -154,16 +156,16 @@ file with the following content:
154
156
[system_default_sect]
155
157
Options = UnsafeLegacyServerConnect
156
158
157
- Then run Python using that OpenSSL config file:
159
+ Then run Python while setting the ``OPENSSL_CONF `` environment variable to use
160
+ OpenSSL configuration file you just created:
158
161
159
162
.. code-block :: shell
160
163
161
164
OPENSSL_CONF=/path/to/the/config/file/above.cnf python ...
162
165
163
- The ``UnsafeLegacyServerConnect `` option in ``OPENSSL_CONF `` requires OpenSSL v3.0.4
164
- or greater.
166
+ .. important ::
165
167
166
- .. warning ::
167
-
168
- This workaround should only be used as a last resort to address `` unsafe legacy
169
- renegotiation disabled `` errors.
168
+ Because setting the `` UnsafeLegacyServerConnect `` option has
169
+ ` security implications < https://docs.openssl.org/3.0/man3/SSL_CTX_set_options/#patched-openssl-client-and-unpatched-server >`__,
170
+ this workaround should only be used as a last
171
+ resort to address `` unsafe legacy renegotiation disabled `` errors.
0 commit comments