httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_config.c
Date Fri, 30 May 2003 21:01:57 GMT
wrowe       2003/05/30 14:01:57

  Modified:    modules/ssl ssl_engine_config.c
  Log:
    Provide a far more useful explanation when SSLCryptoDevice fails to
    find a device.  Still would be nice to implement dynamic:{options}
    but this gets us to display the usual, builtin devices.
  
    We now load builtin engines up front, in the pre_config phase, because
    this and any other config cmd processor must have an already valid
    library config.  So loading builtin engines becomes redundant in this
    cmd handler.
  
  Revision  Changes    Path
  1.80      +12 -10    httpd-2.0/modules/ssl/ssl_engine_config.c
  
  Index: ssl_engine_config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_config.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- ssl_engine_config.c	30 May 2003 18:41:53 -0000	1.79
  +++ ssl_engine_config.c	30 May 2003 21:01:57 -0000	1.80
  @@ -518,16 +518,7 @@
       SSLModConfigRec *mc = myModConfig(cmd->server);
       const char *err;
       ENGINE *e;
  -#ifdef HAVE_ENGINE_LOAD_BUILTIN_ENGINES
  -    static int loaded_engines = FALSE;
   
  -    /* early loading to make sure the engines are already 
  -       available for ENGINE_by_id() above... */
  -    if (!loaded_engines) {
  -        ENGINE_load_builtin_engines();
  -        loaded_engines = TRUE;
  -    }
  -#endif
       if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY))) {
           return err;
       }
  @@ -540,7 +531,18 @@
           ENGINE_free(e);
       }
       else {
  -        return "SSLCryptoDevice: Invalid argument";
  +        err = "SSLCryptoDevice: Invalid argument; must be one of: "
  +              "'builtin' (none)";
  +        e = ENGINE_get_first(); 
  +        while (e) {
  +            ENGINE *en;
  +            err = apr_pstrcat(cmd->pool, err, ", '", ENGINE_get_id(e), 
  +                                         "' (", ENGINE_get_name(e), ")", NULL);
  +            en = ENGINE_get_next(e);
  +            ENGINE_free(e);
  +            e = en;
  +        }
  +        return err;
       }
   
       return NULL;
  
  
  

Mime
View raw message