Open matthew119427 opened 5 years ago
You have to complete the TLS handshake before you can get the host
header, so this isn't really possible. What people do instead is use one certificate with multiple domains (SANs).
Hmm, I was using a module to do this but it appears that module doesn't want to send the intermediate certificates with it.
You can make this work with server.addContext(hostname, context)
: https://nodejs.org/docs/latest/api/tls.html#tls_server_addcontext_hostname_context
It selects the TLS context to use based on the SNI (Server Name Indication extension) in the client's handshake.
If you need something fancier / more dynamic, you probably have to set up a net.Server
and parse the ClientHello yourself before forwarding it to a tls.Server
. The SNI hostname is a plaintext part of the ClientHello.
Is a "TLS" server basically a "HTTPS" server? Like would this work with https.createServer();
?
https.Server
extends tls.Server
so yes, that should work.
Thanks @bnoordhuis, appreciate the responsiveness and support.
Actually, gonna have to reopen this. I just did that and it's throwing me unknown issuer errors. Looks like the https server with .addContext
isnt sending the intermediate certificates I specified.
Can you post a standalone test case? Hard to say what's going wrong without the corresponding code.
Just the basics of setting it up.
const https = require('https');
const options = {
key: fs.readFileSync(path.join(__dirname + '/ssl/wildcard.key.pem')),
cert: fs.readFileSync(path.join(__dirname + '/ssl/wildcard.crt')),
ca: fs.readFileSync(path.join(__dirname + '/ssl/secure-chain.crt', ))
};
const server = https.createServer(options, main).listen(port, function() { //eslint-disable-line
console.log('Express server listening on port ' + port);
});
const caCreds = {
key: fs.readFileSync(path.join(__dirname + '/ssl/casite.key.pem')),
cert: fs.readFileSync(path.join(__dirname + '/ssl/casite.crt')),
ca: fs.readFileSync(path.join(__dirname + '/ssl/ov-c.crt', ))
};
server.addContext('certificates.libraryofcode.us', caCreds);```
Can you post the contents of wildcard.crt
and secure-chain.crt
? What does openssl s_client -connect <host>:<port>
print?
OpenSSL doesn't take the certificates either, Chrome and FireFox both do not take them as well.
wildcard.crt -----BEGIN CERTIFICATE----- MIIJHzCCBpOgAwIBAgICEAEwDQYJKoZIhvcNAQENBQAwgcAxCzAJBgNVBAYTAlVT MREwDwYDVQQIDAhWaXJnaW5pYTEeMBwGA1UECgwVTGlicmFyeSBvZiBDb2RlI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HoAHsMITTL61iw4pMJB9bCqsEW24mnBrSm9mTGtp/5SOuV9Lm01IQP OFqqU9kQ8/A5zis8rN71ID3XQI8NFu6iZCqn+N5YZITDLfEgUsJuuL7HOkO1w2IP XqQ5tc6LAM2tx5TnS5otg6L+TdwkW1XEJpJTmFRuTQz7LTGE9pa2ZFeQKxtLkaAG ImbTJP0YsX71BOoJNqB8dUnNgugJABkxyk8TZvnnYIaY9FAk06q5rKRE8yQu4WUY kZkUuUdzziU+Wzqb8oBxlUF44Z9mVh3FyT8584A25X6nx6Lh8LxBv6xEJZFubCV1 PTWAMn0SavVQi6+TiK8SUHtGZPofSNYFMxdrwlfZvMn4eNfyG8Teol5r0bWnWNAM fjWCTS04/2G+sC0PV0yHytbAg2zIxhUXbKerOQSR4hf+dWl2X+ffk2zn4b22Itoj iPjXVXr0YrRiJwRzXfXpzoSpC/LoXNIzN++SysiibYgAhg12wW4tus0i3S4ygR5A ekwUKdSCRp8WGBX0Cize6rYA/Mag2dmosRKfX9UZHsHRBSoF1xCy6CIi6JlLlWvc DSbJRs0sDaablVMUmI2JUzXlL2cE0uf0/Ld05uDOApNSYD0uYSNVZEzKwp7xQeqv gQeFjlWeRWltqTgBzdVyH4qfjL0yKxYrF6zOF7SiS/XZZesI4X2xgA8b+dmsIOwF 3/mIdtweMou8Ffb6QFWfLj5GKeXyw2TM16adOzwGnMDz0d6G9318pFyiVQsA7xbl XxzFjIsq7vG/0DibOGA15vAcvmJ9XhEvf5ycA9+Jh7pmrN2Owi0Ym6DjCHcai1/T bqxau677dpfM6vVTqKw1TBWlR6xTLpFQ+EEbxUFEI7PAgfD4E/YAFLsfkfvSLpKo iw== -----END CERTIFICATE-----
I'm not sure it's the cause but the chain's certificates have really unusual public key sizes: 5024, 7072 and 8048 bits.
The first chain certificate and the server's certificate have the same serial number but that probably doesn't matter because they have different issuers.
What did openssl s_client
print?
@bnoordhuis Basically says "cannot verify"
This is with certificates from my own CA authority, but I've tried it with certificates from Sectigo (Comodo CA) and it still does the same thing.
@dutchvanderlinde - was this progressed further / resolved?
Never really got a clear answer or conclusion to my issue, was never fixed but just ended up using Nginx as a replacement.
is anybody having update on this issue; is it addressed in the current version of the nodejs
is anybody having update on this issue; is it addressed in the current version of the nodejs
Look at SNICallback + TLS context
@matthew119427 Do you still need help or can this be closed?
Hi, I was referred here by the question at https://github.com/expressjs/vhost/issues/35
I was wondering on how to send different x509 certificates depending on the subdomain name visited on the site for Express/HTTPS. Basically, say someone visits cdn.example.com, it would see the site name and send a different certificate than the default one for example. Any help would be appreciated!
(Response on that issue above informed me to come here, referenced the TLS module and SNI.