SSL routines:final_renegotiate:unsafe legacy renegotiation disabled #2269
-
|
Hi All, We are using Node v17.9.0.
Getting below error in logs- Error: write EPROTO C047BFCB1D7F0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:../deps/openssl/openssl/ssl/statem/extensions.c:908: Any leads would be highly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Chiming in to say that I need a solution for this as well. The API I'm trying to reach is using unsafe legacy renegotiation and I have no way around it. Other HTTP libraries have a way to pass something like |
Beta Was this translation helpful? Give feedback.
-
|
This error occurs becuase the server you're connecting to uses unsafe legacy SSL renegotiation, which is disabled by default in newer Node.js versions for security reasons. You can enable it using the import https from 'https';
import got from 'got';
await got('https://example.com', {
https: {
secureOptions: https.constants.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
}
});For streams, it works the same way: const stream = got.stream('https://example.com', {
https: {
secureOptions: https.constants.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
}
});Note that this re-enables unsafe legacy renegotiation, which has security implications. Ideally, the server should be updated to support secure renegotiation, but this workaround will get you unblocked in the meantime. |
Beta Was this translation helpful? Give feedback.
This error occurs becuase the server you're connecting to uses unsafe legacy SSL renegotiation, which is disabled by default in newer Node.js versions for security reasons.
You can enable it using the
https.secureOptionsoption with Got:For streams, it works the same way:
Note that this re-enables unsafe legacy renegotiation, which has security implications. Ideally, the ser…