On Thu, Jan 26, 2006, Joe Gluck wrote: > Hi, > > > I am using OpenSSL and although they have the X509_cmp() function, I > prefer not to use it because it rehashes the certificate (or at least > it seems so to me) and I want to get the maximum performance I can > get., so I built my own compare function and I would like to hear your > opinion. >
It calculates the certificate hash once and caches the result. Various operations in OpenSSL automatically calculate the hash: for example the standard certificate verification process. So after the first hash it simply does a memcmp() of two 20 byte buffers which should be efficient enough for anyone... Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
