httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_init.c
Date Thu, 28 Mar 2002 01:14:53 GMT
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);
   
  
  
  

Mime
View raw message