-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL routines :unsafe legacy renegotiation disabled #1064
Comments
报错的链接发我下 |
重新安装 Whistle 并重启试试 |
无用,唯一有效的临时解决方案是卸载Node.js 20 LTS,降级安装Node.js 16,利用旧版本Node.js默认情况下开启OpenSSL的legacy renegotiation配置的特性,可无错访问到使用旧版(1.1.x)OpenSSL的server端。但也会在另一些情况下带来新的SSL问题。所以还是希望能在Whistle代码中显式 |
看下 Whistle 是不是最新版本 2.9.69: npm i -g whistle --registry=https://registry.npmmirror.com && w2 restart |
用yarn管理包,在 |
用Whistle做MITM proxy访问网站时发生下面的错误:
From: [email protected] Node: v20.12.2 Error: 444E0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:c:\ws\deps\openssl\openssl\ssl\statem\extensions.c:922:
查Stackoverflow得知因为CVE-2009-3555,Node.js 18+ 默认关闭了OpenSSL中TLS unsafe legacy renegotiation,导致与使用旧版(1.1.x) OpenSSL的服务器连接失败。尝试用自定义OpenSSL配置文件(新建openssl.cnf填充配置并加入
Options = UnsafeLegacyRenegotiation
)启动:node --openssl-config=openssl.cnf node_modules\whistle\bin\whistle.js run
依然失败,这时看到有人说在代码里处理request和response时可以加入
crypto.constants.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
因为不熟悉whistle,请指点应该怎样修改(如果能增加程序启动选项支持就更好了)
参考:
https://stackoverflow.com/questions/74324019/allow-legacy-renegotiation-for-nodejs
https://johnnyreilly.com/node-18-axios-and-unsafe-legacy-renegotiation-disabled
https://stackoverflow.com/questions/76670346/node-js-18-16-1-fetcherror-unsafe-legacy-renegotiation
The text was updated successfully, but these errors were encountered: