NodeJS TLS Stuff #526
-
Hi, love this project it's solid 💯 💯 Has anyone played with the uws equivalent of following, or got thoughts on them?
Example usage in NodeJS is the following const https_server_options = {
key,
cert,
ca,
minVersion: tls_min_version,
maxVersion: 'TLSv1.3',
ecdhCurve: 'auto',
honorCipherOrder: true,
secureOptions: crypto.constants.SSL_OP_NO_TICKET
| crypto.constants.SSL_OP_NO_SSLv2
| crypto.constants.SSL_OP_NO_SSLv3
| crypto.constants.SSL_OP_NO_TLSv1
| crypto.constants.SSL_OP_NO_TLSv1_1
| crypto.constants.SSL_OP_CIPHER_SERVER_PREFERENCE
| crypto.constants.SSL_OP_PRIORITIZE_CHACHA,
};
if (tls_min_version === 'TLSv1.3') {
https_server_options.secureOptions |= crypto.constants.SSL_OP_NO_TLSv1_2;
}
if (dhparam !== undefined) {
https_server_options.dhparam = dhparam;
}
const https_server = https.createServer(https_server_options, some_request_listener); References
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
We do expose SSL_CTX pointers to the user to make specialized options like those, but for Node.js that's of course not possible. If you have an SSL option you need, and have economic incentive to make it happen -> go for it. |
Beta Was this translation helpful? Give feedback.
-
Hi @alexhultman-2fa, noted on that, thanks a lot! Also, is there a way to detect if the current request is a secure one? Something like
Reference |
Beta Was this translation helpful? Give feedback.
We do expose SSL_CTX pointers to the user to make specialized options like those, but for Node.js that's of course not possible. If you have an SSL option you need, and have economic incentive to make it happen -> go for it.