Closed
Description
I'm having an issue with ssl certificate validation using the tls
module. The server is started with:
tls.createServer({
pfx: fs.readFileSync(config.certFile),
passphrase: config.keyPass,
requestCert: true,
rejectUnauthorized: false
}, ...);
The client:
tls.connect({
port: config.port,
host:config.host,
pfx: fs.readFileSync(config.cert),
passphrase: config.pass,
rejectUnauthorized: false
});
My issue is that I get tlsSocket.authorizationError
SELF_SIGNED_CERT_IN_CHAIN on v4.2.5+ but not on older versions. Here's my output on a Windows machine, but the same happens on an Ubuntu server.
>nodist 4.2.5
>node --version
v4.2.5
>node server.js
server started:
auth->SELF_SIGNED_CERT_IN_CHAIN
>nodist 4.2.4
nodev4.2.4
>node server.js
server started:
auth->null
The auth->
line is printed to console with the tlsSocket.authorizationError
parameter when a client connects. In the case of a successful connect this field is null
.
Tested down to 0.12.9, all versions read the certificate without issues.