NodeJs tls library rejects the self signed certificates #18527
Labels
question
Issues that look for answers.
tls
Issues and PRs related to the tls subsystem.
wrong repo
Issues that should be opened in another repository.
I have An internal network and the nodes inside that network should have a secured communications so i figured out that i should TLS library ro establish connections between them , i have generated Root certificate , server certificate
when the client want to connect to a certain server here is the code that it uses to connect to the servrer:
Error:
Error: self signed certificate in certificate chain
at Error (native)
at TLSSocket. (_tls_wrap.js:1092:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:610:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
Details:
I see a lot of people who suggest to set rejectUnauthorized=false in my case, i guess setting rejectUnauthorized to false will stop the error but my connections are 100% prone to MITM atacks , I see that this is a bug in nodejs tls library that it suffers from and i can't find any fix any where (i have google to page 5 of google results that is really deep) i don't know how other people don't talk about it , AM I missing something here! !!!!! please correct me if i am wrong !!
The text was updated successfully, but these errors were encountered: