question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stopped working with Node LTS 18? ("Error: error:0308010C:digital envelope routines::unsupported")

See original GitHub issue

Hello,

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?

[1] https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
skrthebosscommented, Dec 2, 2022

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 other DES-ECB which have both been removed in the default provider of OpensslV3, see https://wiki.openssl.org/index.php/OpenSSL_3.0#Providers.

0reactions
cjnonamecommented, Dec 23, 2022

We got the same issue here

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found