[Bug 1991] openssl version checking needs updating

bugzilla-daemon at bugzilla.mindrot.org
Fri, 30 Mar 2012 00:17:31 -0000

Darren Tucker <dtucker at zip.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dtucker at zip.com.au

--- Comment #3 from Darren Tucker <dtucker at zip.com.au> 2012-03-30
11:17:31 EST ---
I think it would be simpler and more correct to keep the existing logic
and just change the mask size, eg:

u_long version_mask = SSLeay() >= 0x10000000 ?  ~0xffff0L : ~0xff0L;
if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & version_mask)
        fatal("OpenSSL version mismatch. Built against %lx, you "
            "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay());