summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--entropy.c9
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ac8fd70b7..00be8d367 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
120120330 120120330
2 - (dtucker) [contrib/redhat/openssh.spec] Bug #1992: remove now-gone WARNING 2 - (dtucker) [contrib/redhat/openssh.spec] Bug #1992: remove now-gone WARNING
3 file from spec file. From crighter at nuclioss com. 3 file from spec file. From crighter at nuclioss com.
4 - (djm) [entropy.c] bz#1991: relax OpenSSL version test to allow running
5 openssh binaries on a newer fix release than they were compiled on.
6 with and ok dtucker@
4 7
520120309 820120309
6 - (djm) [openbsd-compat/port-linux.c] bz#1960: fix crash on SELinux 9 - (djm) [openbsd-compat/port-linux.c] bz#1960: fix crash on SELinux
diff --git a/entropy.c b/entropy.c
index 2d6d3ec52..2d483b391 100644
--- a/entropy.c
+++ b/entropy.c
@@ -211,9 +211,14 @@ seed_rng(void)
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 fix versions (so we
216 * allow 1.0.1 to work with 1.0.0). Going backwards is only allowed
217 * within a patch series.
215 */ 218 */
216 if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L) 219 u_long version_mask = SSLeay() >= 0x1000000f ? ~0xffff0L : ~0xff0L;
220 if (((SSLeay() ^ OPENSSL_VERSION_NUMBER) & version_mask) ||
221 (SSLeay() >> 12) < (OPENSSL_VERSION_NUMBER >> 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