From: Guenter Knauf Date: Sun, 27 Sep 2009 01:53:14 +0000 (+0000) Subject: fixed compatibility to Openssl < 0.9.7g; X-Git-Tag: 2.3.3~260 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a04e6cebfcf1ce6ba69cd3cdb397374a0cb128b;p=apache fixed compatibility to Openssl < 0.9.7g; sync'd compatibility to Openssl >= 0.9.9 with 2.2.x branch. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819242 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index fdbe84cde8..d2f09c2dcb 100644 --- a/support/ab.c +++ b/support/ab.c @@ -189,6 +189,19 @@ typedef STACK_OF(X509) X509_STACK_TYPE; #endif +#if defined(USE_SSL) +#if (OPENSSL_VERSION_NUMBER >= 0x00909000) +#define AB_SSL_METHOD_CONST const +#else +#define AB_SSL_METHOD_CONST +#endif +#if (OPENSSL_VERSION_NUMBER >= 0x0090707f) +#define AB_SSL_CIPHER_CONST const +#else +#define AB_SSL_CIPHER_CONST +#endif +#endif + #include #if APR_HAVE_CTYPE_H #include @@ -525,7 +538,7 @@ static void ssl_rand_seed(void) static int ssl_print_connection_info(BIO *bio, SSL *ssl) { - const SSL_CIPHER *c; + AB_SSL_CIPHER_CONST SSL_CIPHER *c; int alg_bits,bits; c = SSL_get_current_cipher(ssl); @@ -609,7 +622,7 @@ static void ssl_proceed_handshake(struct connection *c) if (verbosity >= 2) ssl_print_info(c); if (ssl_info == NULL) { - const SSL_CIPHER *ci; + AB_SSL_CIPHER_CONST SSL_CIPHER *ci; X509 *cert; int sk_bits, pk_bits, swork; @@ -1995,11 +2008,7 @@ int main(int argc, const char * const argv[]) const char *optarg; char c; #ifdef USE_SSL -#if OPENSSL_VERSION_NUMBER >= 0x00909000 - const SSL_METHOD *meth = SSLv23_client_method(); -#else - SSL_METHOD *meth = SSLv23_client_method(); -#endif + AB_SSL_METHOD_CONST SSL_METHOD *meth = SSLv23_client_method(); #endif /* table defaults */