You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The currently implemented TLSSocket handling is not working with mTLS.
Even if the ca, key, pem files are set in the protocolOptions, the connection throws invalid certificate errors.
I did a manual test with the TLSSocket:
let opts = { port, host, ca, key, pem };
let socket = new TLSSocket();
socket.connect(opts);
// throws invalid certificate error. The client certificate is not sent properly.
socket=new TLSSocket(new Socket(opts), opts);
socket.connect(opts);
// no exception, however the socket stuck in 'opening' state
socket = tls.connect(opts)
// this time the connection is successfully opened
The currently implemented TLSSocket handling is not working with mTLS.
Even if the ca, key, pem files are set in the protocolOptions, the connection throws invalid certificate errors.
I did a manual test with the TLSSocket:
Seems like there are a lots of logic in tls.connect, beside creating a TLSSocket:
https://github.com/nodejs/node/blob/43f599b534e60933e86db4d9ad87dfd8750a0f06/lib/_tls_wrap.js#L1590
So probably to make winston-syslog work with TLS, the tls.connect() approach would be better.
The text was updated successfully, but these errors were encountered: