On Jan 23, 2014 6:13 AM, "rysiek" <[1]rysiek@hackerspace.pl> wrote:> About this. Is there a way to serve 2 (or more) certificates for a given HTTPS > server/domain? What I would like to have is a way to: > - serve a proper, vanilla SSL certificate bought from some provider for the > general public accessing my service; > - serve a different cert (for example, using MonkeySphere) for those that do > not trust (and with good reasons) major CA's. > > This would have to work for the *same* domain on the *same* webserver. I > haven't yet seen a way to do this, so this might need implementing, but maybe > somebody here has heard about something along these lines? There are a lot of things like this, but the big question is: how does the user indicate to you which cert they want? If it was via [2]pubca.x.com or [3]privca.x.com - that's easy just put the different certs in the different sites. But otherwise, you have to rely on quirks. TLS allows you to send different certs to different users, but this is based off the handshake and is for algorithm agility - not cert chaining. EG I send ECDSA signed certs if I know you can handle them, and RSA if not. You can also send two leaf certs, two cert chains, a cert and garbage, a cert and a stego message - whatever. This is the closest to what you want, but this is undefined behavior. Browsers may build a valid chain off the public CA, and monkeysphere off the private* and it works perfect... Or the browser may pop an invalid cert warning. It's undefined behavior. You'll have to test, see what happens, and hope chrome doesn't break when it updates every week. -tom * I realize monkey sphere doesn't use a private CA, just using it as an example. References 1. mailto:rysiek@hackerspace.pl 2. http://pubca.x.com/ 3. http://privca.x.com/