HTTPS - Self-signed - bad decrypt

Hello,

i've problem with self-signed certicate .

I created files .pem with

openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out cert.pem -days 1095

And the logs shows this problem :

0|node-red  | Failed to get https settings: Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
0|node-red  | Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
0|node-red  |     at Object.createSecureContext (_tls_common.js:149:17)
0|node-red  |     at Server.setSecureContext (_tls_wrap.js:1328:27)
0|node-red  |     at Server (_tls_wrap.js:1186:8)
0|node-red  |     at new Server (https.js:70:14)
0|node-red  |     at Object.createServer (https.js:94:10)
0|node-red  |     at /usr/lib/node_modules/node-red/red.js:209:24

settings.js

    https: {
      key: require("fs").readFileSync('/home/ubuntu/.node-red/privkey.pem'),
      cert: require("fs").readFileSync('/home/ubuntu/.node-red/cert.pem')
    },

What is the solution for ?

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.