Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 12672 invoked by uid 500); 28 Mar 2002 01:14:54 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 12661 invoked by uid 500); 28 Mar 2002 01:14:54 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 28 Mar 2002 01:14:53 -0000 Message-ID: <20020328011453.88815.qmail@icarus.apache.org> From: dougm@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/ssl ssl_engine_init.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N dougm 02/03/27 17:14:53 Modified: modules/ssl ssl_engine_init.c Log: move server specific init config checks into ssl_init_check_server function (ssl_init_check_proxy will be different) Revision Changes Path 1.71 +29 -21 httpd-2.0/modules/ssl/ssl_engine_init.c Index: ssl_engine_init.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- ssl_engine_init.c 28 Mar 2002 01:07:20 -0000 1.70 +++ ssl_engine_init.c 28 Mar 2002 01:14:53 -0000 1.71 @@ -365,6 +365,34 @@ } #endif +static void ssl_init_check_server(server_rec *s, + apr_pool_t *p, + apr_pool_t *ptemp, + SSLSrvConfigRec *sc) +{ + /* + * check for important parameters and the + * possibility that the user forgot to set them. + */ + if (!sc->szPublicCertFiles[0]) { + ssl_log(s, SSL_LOG_ERROR|SSL_INIT, + "No SSL Certificate set [hint: SSLCertificateFile]"); + ssl_die(); + } + + /* + * Check for problematic re-initializations + */ + if (sc->pPublicCert[SSL_AIDX_RSA] || + sc->pPublicCert[SSL_AIDX_DSA]) + { + ssl_log(s, SSL_LOG_ERROR|SSL_INIT, + "Illegal attempt to re-initialise SSL for server " + "(theoretically shouldn't happen!)"); + ssl_die(); + } +} + static SSL_CTX *ssl_init_ctx(server_rec *s, apr_pool_t *p, apr_pool_t *ptemp, @@ -652,27 +680,7 @@ int is_ca, pathlen; int i; - /* - * Now check for important parameters and the - * possibility that the user forgot to set them. - */ - if (!sc->szPublicCertFiles[0]) { - ssl_log(s, SSL_LOG_ERROR|SSL_INIT, - "No SSL Certificate set [hint: SSLCertificateFile]"); - ssl_die(); - } - - /* - * Check for problematic re-initializations - */ - if (sc->pPublicCert[SSL_AIDX_RSA] || - sc->pPublicCert[SSL_AIDX_DSA]) - { - ssl_log(s, SSL_LOG_ERROR|SSL_INIT, - "Illegal attempt to re-initialise SSL for server " - "(theoretically shouldn't happen!)"); - ssl_die(); - } + ssl_init_check_server(s, p, ptemp, sc); ctx = ssl_init_ctx(s, p, ptemp, sc);