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

Collapse All | Expand All

(-)a/entropy.c (-2 / +7 lines)
Lines 211-219 seed_rng(void) 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 minor 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 >> 12) < 0x10000 && bldver != runver) ||
221
		(bldver >> 12) >= 0x10000 && (runver >> 12) < (bldver >> 12)))
217
		fatal("OpenSSL version mismatch. Built against %lx, you "
222
		fatal("OpenSSL version mismatch. Built against %lx, you "
218
		    "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
223
		    "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
219
224

Return to bug 1991