]> granicus.if.org Git - apache/commitdiff
* Use correct #ifndef's to compile again on openssl 0.9.8 and fix compiler
authorRuediger Pluem <rpluem@apache.org>
Wed, 11 Nov 2009 20:27:10 +0000 (20:27 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 11 Nov 2009 20:27:10 +0000 (20:27 +0000)
  warnings.

Noted by: sf

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@835046 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_init.c

index 3b7b019567026e47b52301198039b505e6bc2c37..00d07967e51d26926cb2061889711fd5526e2301 100644 (file)
@@ -936,10 +936,16 @@ static void ssl_init_server_certs(server_rec *s,
                                   apr_pool_t *ptemp,
                                   modssl_ctx_t *mctx)
 {
-    const char *rsa_id, *dsa_id, *ecc_id;
+    const char *rsa_id, *dsa_id;
+#ifndef OPENSSL_NO_EC
+    const char *ecc_id;
+#endif
     const char *vhost_id = mctx->sc->vhost_id;
     int i;
-    int have_rsa, have_dsa, have_ecc;
+    int have_rsa, have_dsa;
+#ifndef OPENSSL_NO_EC
+    int have_ecc;
+#endif
 
     rsa_id = ssl_asn1_table_keyfmt(ptemp, vhost_id, SSL_AIDX_RSA);
     dsa_id = ssl_asn1_table_keyfmt(ptemp, vhost_id, SSL_AIDX_DSA);
@@ -974,17 +980,17 @@ static void ssl_init_server_certs(server_rec *s,
 
     have_rsa = ssl_server_import_key(s, mctx, rsa_id, SSL_AIDX_RSA);
     have_dsa = ssl_server_import_key(s, mctx, dsa_id, SSL_AIDX_DSA);
-#if SSL_LIBRARY_VERSION >= 0x00908000
+#ifndef OPENSSL_NO_EC
     have_ecc = ssl_server_import_key(s, mctx, ecc_id, SSL_AIDX_ECC);
 #endif
 
     if (!(have_rsa || have_dsa
-#if SSL_LIBRARY_VERSION >= 0x00908000
+#ifndef OPENSSL_NO_EC
         || have_ecc
 #endif
           )) {
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
-#if SSL_LIBRARY_VERSION >= 0x00908000
+#ifndef OPENSSL_NO_EC
                 "Oops, no RSA, DSA or ECC server private key found?!");
 #else
                 "Oops, no RSA or DSA server private key found?!");