From 782b4e6ff02af895ba5dd450f3bc612a83b6e071 Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Tue, 26 Apr 2011 22:32:12 -0400 Subject: [PATCH] Detect whether to use const SSL_METHOD * in myssl.c --- src/myssl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/myssl.c b/src/myssl.c index e521c8f..c14560b 100644 --- a/src/myssl.c +++ b/src/myssl.c @@ -70,6 +70,7 @@ void shutdown_checkpoint(void); #include #endif +#include #include #include #include @@ -98,6 +99,12 @@ void shutdown_checkpoint(void); #define ssl_debugdump(x) #endif +#if OPENSSL_VERSION_NUMBER >= 0x10000000L +#define SSL_METHOD_CONST const +#else +#define SSL_METHOD_CONST +#endif + static void ssl_errordump(const char *msg); static int client_verify_callback(int preverify_ok, X509_STORE_CTX * x509_ctx); static DH *get_dh1024(void); @@ -112,7 +119,7 @@ static SSL_CTX *ctx = NULL; SSL_CTX * ssl_init(void) { - SSL_METHOD *meth; + SSL_METHOD_CONST SSL_METHOD *meth; unsigned char context[128]; DH *dh; unsigned int reps = 1; -- 2.30.2