3 ms·
It would be nice if you could send two end-entity certs, with the same public key, and different intermediates, and the other side would pick which ever one it
by toast0 6y ago
It would be nice if you could send two end-entity certs, with the same public key, and different intermediates, and the other side would pick which ever one it liked.
Otherwise, you have to figure out which one root CA all your clients like, because it's probably hard to figure out which clients need which certs.
- corty 6y agoYou can do that I think. Your webserver sends your certificate(s) along with a chain of CA certificates up to a known root certificate. It is acceptable to send CA certificates that the browser already knows, that form signing loops, that lead nowhere, etc. It is the browser's job to figure out a signature path from a known root CA through the sent-along CA certificates to the leaf certificate you are using. The only thing I'm not quite sure of is if sending along more than one leaf certificate will work. However, if you want to try it out, create your two leaf certificates from the same RSA private key, and configure your webserver to send along the relevant CA certificates as well as your two leafs in a CertificateChainFile (i believe thats what the config option is called in apache). The ChainFile is just the concatenation of the text-form, PEM-encoded leaf and CA certificates you want.
- dtech 6y agoiirc that's already possible, it's how letsencrypt started out without its own root widely distributed by having its intermediate certificates cross-signed with IdenTrust root.
- tialaramex 6y agoNo, your parent is describing sending two leaf certificates, which won't work. You can send multiple intermediates, and some clients are intelligent enough to ignore the ones they don't trust. But unfortunately not all clients get this right, and the ones least likely to do so are also the older ones that likely will cease working when Identrust's DST Root CA X3 expires. A smart modern client (e.g. most current web browsers) will just use anything else you send as a hint that can help it find a way to trust the leaf certificate. You can send irrelevant garbage and it won't count against you, but because other dumber clients exist, you are recommended not to send anything that doesn't form a logical chain of certificates back to a trusted root. Old versions of OpenSSL for example provide a trust decision framework that assumes any chain you show it is the only valid chain, if that chain is nonsense or untrusted, it gives up and fails immediately, even if it would be obvious to a human shown the same certificates that there's a simple and correct trust path. This is harder than it might seem because it's a graph problem and the Web PKI graph contains multiple cycles, a naive algorithm may spin uselessly forever or miss "obvious" answers.
- lxgr 6y agoVery interesting! Out of curiosity, how could there be cycles in the graph?