openbsd-ports/devel/opencm/patches/patch-base_src_common_SSLcommon_h

35 lines
1.1 KiB
Plaintext

$OpenBSD: patch-base_src_common_SSLcommon_h,v 1.1 2002/08/28 22:23:29 todd Exp $
--- base/src/common/SSLcommon.h.orig Mon Jul 8 16:30:58 2002
+++ base/src/common/SSLcommon.h Wed Aug 28 14:26:40 2002
@@ -42,12 +42,29 @@
*/
#ifndef HAVE_OPENSSL
-#error "Configure script did not locate OpenSSL"
+ #error "Configure script did not locate OpenSSL"
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
+
+#ifndef OPENSSL_VERSION_NUMBER
+ #error "OPENSSL_VERSION_NUMBER is not defined!"
+#endif
+
+/*
+ opensslv.h documents this format: it should match 0.9.6-dev or higher
+ versions, which seems about right. We need 0.9.6 cause PRNG.c wants
+ to use RAND_egd_bytes, which is not available in 0.9.5 or previous versions.
+
+ A couple other (older) version formats are mentioned in the header. However,
+ all of them should result in a version code less than x09060000, so we should
+ be OK.
+*/
+#if (OPENSSL_VERSION_NUMBER < 0x00906000)
+ #error "OpenSSL 0.9.6 or higher is required by OpenCM"
+#endif
#define BUFSIZZ 1024
#define SSLPORT 4433