Stopped working with Node LTS 18? ("Error: error:0308010C:digital envelope routines::unsupported")
See original GitHub issueHello,
when I try to run some code, that uses node-http-ntlm, using the latest Node LTS (currently v18.12.1) it results in an error:
node:internal/crypto/cipher:116
this[kHandle].initiv(cipher, credential, iv, authTagLength);
^
Error: error:0308010C:digital envelope routines::unsupported
at Cipheriv.createCipherBase (node:internal/crypto/cipher:116:19)
at Cipheriv.createCipherWithIV (node:internal/crypto/cipher:135:3)
at new Cipheriv (node:internal/crypto/cipher:243:3)
at Object.createCipheriv (node:crypto:141:10)
at encrypt (C:\folder\node_modules\httpntlm\ntlm.js:265:20)
at create_LM_hashed_password_v1 (C:\folder\node_modules\httpntlm\ntlm.js:269:27)
at Object.createType3Message (C:\folder\node_modules\httpntlm\ntlm.js:181:70)
at sendType3Message (C:\folder\node_modules\httpntlm\httpntlm.js:77:23)
at Immediate.<anonymous> (C:\folder\node_modules\httpntlm\httpntlm.js:101:4)
at process.processImmediate (node:internal/timers:471:21) {
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v18.12.1
Running the same code with the previous LTS (v16) I am not experience that issue.
According to [1], it seems to be having to do with some breaking change that happened in node.js v17 related to openssl. A “workaround” apparently is to use “–openssl-legacy-provider” with node or downgrading to v16 - both of which do not feel like a “real solution”.
Is anyone else experiencing the same issue with node v18, or is it just me?
Issue Analytics
- State:
- Created 10 months ago
- Comments:6
Top Results From Across the Web
Error message "error:0308010C:digital envelope routines ...
This error is because node.js 17 uses OpenSSL3, which has changed code for initialization context of md family (including md4), and this is...
Read more >error:0308010c:digital envelope routines::unsupported [Node ...
you're not using the LTS (long term support) version of Node JS. You can see I'm using Node 17.0.0, which is not an...
Read more >How to Fix the Error Error:error:0308010C:digital envelope ...
Downgrade your machine's installed version of Node.js to 16 or below. Pass the --openssl-legacy-provider flag to Webpack or the Webpack-based ...
Read more >Error: Error:0308010C:Digital Envelope Routines::Unsupported
The common error:0308010c:digital envelope routines::unsupported bug appears due to outdated Node.JS versions when running development servers.
Read more >Error:0308010C:digital envelope routines::unsupported #11708
I am having the same issue with Windows 10 21H1 (19048.1348), WSL 2 (Ubuntu 20.04.3 LTS) and Node 17.0.1. We have two three...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After some debugging I found, that the problem relies in those two blocks:
https://github.com/SamDecrock/node-http-ntlm/blob/7058d3482a95bdf7f8686653a9e361d6f3abd20d/ntlm.js#L366-L371 https://github.com/SamDecrock/node-http-ntlm/blob/7058d3482a95bdf7f8686653a9e361d6f3abd20d/ntlm.js#L373-L391
One is using
md4
and the otherDES-ECB
which have both been removed in the default provider of OpensslV3, see https://wiki.openssl.org/index.php/OpenSSL_3.0#Providers.We got the same issue here