View | Details | Raw Unified | Return to bug 1991 | Differences between
and this patch

Collapse All | Expand All

(-)entropy.c (-2 / +11 lines)
Lines 211-219 Link Here
211
#endif
211
#endif
212
	/*
212
	/*
213
	 * OpenSSL version numbers: MNNFFPPS: major minor fix patch status
213
	 * OpenSSL version numbers: MNNFFPPS: major minor fix patch status
214
	 * We match major, minor, fix and status (not patch)
214
	 * We match major, minor, fix and status (not patch) for <1.0.0.
215
	 * After that, we acceptable compatible patch versions (so we
216
	 * allow 1.0.1 to work with 1.0.0).
215
	 */
217
	 */
216
	if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L)
218
	u_long bldver = OPENSSL_VERSION_NUMBER & ~0xff0L;
219
	u_long runver = SSLeay() & ~0xff0L;
220
	if (bldver != runver &&
221
	    !(((bldver >> 12) >= 0x10000) &&	/* Allow >=1.* IFF */
222
	    (bldver >> 20) == (runver >> 20) &&	/* minors match; and */
223
	    (bldver >> 12) <= (runver >> 12) &&	/* runtime is not older; and */
224
	    (bldver & 0xf) == 0xf &&		/* build is release; and */
225
	    (runver & 0xf) == 0xf))		/* runtime is release */
217
		fatal("OpenSSL version mismatch. Built against %lx, you "
226
		fatal("OpenSSL version mismatch. Built against %lx, you "
218
		    "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
227
		    "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
219
228

Return to bug 1991