On Tue, Jul 16, 2002 at 03:06:53PM -0700, Patrick Powell wrote: > > From: Lutz Jaenicke <[EMAIL PROTECTED]> > > OpenSSL itself uses hashes for comparison. If the hashes are identical, > > so are the certificates. > > Ummm... is there an example piece of code that does the hash generation > and then checks the certs? I just KNOW that I saw it somewhere.
For a method of looking up files in a directory, check out the c_rehash script delivered with OpenSSL. It generates the hashes used to look up CA certificates by using "openssl x509 -hash". Correspondingly you will find the code to search and compare these hashes in crypto/x509/by_dir.c (hashes are hashes of the subject name used for lookup). I also think that you will find crypto/x509/x509_cmp.c most insteresting :-) Best regards, Lutz -- Lutz Jaenicke [EMAIL PROTECTED] http://www.aet.TU-Cottbus.DE/personen/jaenicke/ BTU Cottbus, Allgemeine Elektrotechnik Universitaetsplatz 3-4, D-03044 Cottbus ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]