On Thu, Nov 24, 2005 at 03:06:05PM -0000, Mark wrote: > Hi, > > > You load the server cert with SSL_CTX_use_certificate_file() > > and the CA... certs with SSL_CTX_use_certificate_chain_file() > > Normally you don't have to load the root because the > > client has to have the root cert to verify the chain... > > How does the client get the root certificate? Is it automatically sent > to the client during the handshake or does the client need to load if > from some file?
You point at it in the context before the handshake. You can either point at a dir full of digest named ones or a specific root cert file. It CANNOT turn up as part of the handshake; otherwise, the client is effectively saying "here's my certificate of authenticity, and you can check it using this certificate..." It's like when someone turns up and says they're from the electric company, and hands you a phone number to call to verify that they are... You can't trust the phone number, since you don't trust them yet. Instead you get a phone number from the phone book to call -- in this case, the phonebook is being the "certificate authority", which you trust. It's important that the root cert on the handshakee can't be tampered with. If it can be replaced by an attacker, they can write "authentic" login certificates which will pass verification. This is akin to the intruder printing a new phone book with his accomplice's number in it and delivering it to you before he attempts to gain entry. The easiest way of preventing this is to have many copies of your public root cert about, and have the handshakee go and find one on the internet and check that the one they have really is the real one. Since our systems don't necessarily have internet access, we've opted for putting the root cert's fingerprint in custom silicon; duplicating the silicon with the fingerprint of a forged root cert is deemed beyond the means of a reasonable attacker for the system. The CIA might be able to do it but we're not defending against the CIA. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
