Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to get this library to set the SNI field when establishing a TLS connection? #2560

Open
ctindel opened this issue Apr 4, 2024 · 2 comments

Comments

@ctindel
Copy link

ctindel commented Apr 4, 2024

I don't see any options for having it set the TLS server name indication field when ssl attributes are part of the configuration. Is there a way to do this?

@sidorares
Copy link
Owner

It's currently set to be hostname you are connecting to -

const servername = this.config.host;
let secureEstablished = false;
this.stream.removeAllListeners('data');
const secureSocket = Tls.connect({
rejectUnauthorized,
requestCert: rejectUnauthorized,
checkServerIdentity: verifyIdentity
? Tls.checkServerIdentity
: function() { return undefined; },
secureContext,
isServer: false,
socket: this.stream,
servername

What's your scenario? Do you need to set it to a different value?

@ctindel
Copy link
Author

ctindel commented Apr 5, 2024

Maybe I'm doing something wrong, I couldn't get it working to connect using mTLS based authentication and I thought maybe it wasn't setting the SNI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants