You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2007/08/28 16:08:30 UTC

[Fwd: svn commit: r570419 - in /httpd/httpd/branches/2.2.x: STATUS modules/ssl/ssl_engine_init.c modules/ssl/ssl_engine_vars.c modules/ssl/ssl_util_ssl.h]

Since this changes the user experience, would you mind terribly
applying the CHANGES as well?  (I format my STATUS entries for
CHANGES now, since a diff of CHANGES never applies clean ;-)

Re: [Fwd: svn commit: r570419 - in /httpd/httpd/branches/2.2.x: STATUS modules/ssl/ssl_engine_init.c modules/ssl/ssl_engine_vars.c modules/ssl/ssl_util_ssl.h]

Posted by Jim Jagielski <ji...@jaguNET.com>.
done and done

On Aug 28, 2007, at 10:08 AM, William A. Rowe, Jr. wrote:

> Since this changes the user experience, would you mind terribly
> applying the CHANGES as well?  (I format my STATUS entries for
> CHANGES now, since a diff of CHANGES never applies clean ;-)
>
> From: jim@apache.org
> Date: August 28, 2007 9:40:02 AM EDT
> To: cvs@httpd.apache.org
> Subject: svn commit: r570419 - in /httpd/httpd/branches/2.2.x:  
> STATUS modules/ssl/ssl_engine_init.c modules/ssl/ssl_engine_vars.c  
> modules/ssl/ssl_util_ssl.h
> Reply-To: dev@httpd.apache.org
>
>
> Author: jim
> Date: Tue Aug 28 06:40:01 2007
> New Revision: 570419
>
> URL: http://svn.apache.org/viewvc?rev=570419&view=rev
> Log:
> Backported
>
> Modified:
>     httpd/httpd/branches/2.2.x/STATUS
>     httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_init.c
>     httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_vars.c
>     httpd/httpd/branches/2.2.x/modules/ssl/ssl_util_ssl.h
>
> Modified: httpd/httpd/branches/2.2.x/STATUS
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS? 
> rev=570419&r1=570418&r2=570419&view=diff
> ====================================================================== 
> ========
> --- httpd/httpd/branches/2.2.x/STATUS (original)
> +++ httpd/httpd/branches/2.2.x/STATUS Tue Aug 28 06:40:01 2007
> @@ -79,16 +79,6 @@
>  PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
>    [ start all new proposals below, under PATCHES PROPOSED. ]
>
> -    * mod_ssl: Version reporting update; displays 'compiled against'
> -      Apache and build-time SSL Library versions at loglevel [info],
> -      while reporting the run-time SSL Library version in the server
> -      info tags.  Helps to identify a mod_ssl built against one  
> flavor
> -      of OpenSSL but running against another (also adds SSL-C version
> -      number reporting.)  [William Rowe]
> -        http://svn.apache.org/viewvc?view=rev&revision=520701
> -      Backported to 2.2;
> -        http://people.apache.org/~wrowe/r520701-backport-2.2.patch
> -      +1: wrowe, rpluem, jim
>
>  PATCHES PROPOSED TO BACKPORT FROM TRUNK:
>
>
> Modified: httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_init.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/ 
> modules/ssl/ssl_engine_init.c?rev=570419&r1=570418&r2=570419&view=diff
> ====================================================================== 
> ========
> --- httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_init.c  
> (original)
> +++ httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_init.c Tue  
> Aug 28 06:40:01 2007
> @@ -34,42 +34,21 @@
>  **  _________________________________________________________________
>  */
>
> -static char *ssl_add_version_component(apr_pool_t *p,
> -                                       server_rec *s,
> -                                       char *name)
> -{
> -    char *val = ssl_var_lookup(p, s, NULL, NULL, name);
> -
> -    if (val && *val) {
> -        ap_add_version_component(p, val);
> -    }
> -
> -    return val;
> -}
> -
> -static char *version_components[] = {
> -    "SSL_VERSION_PRODUCT",
> -    "SSL_VERSION_INTERFACE",
> -    "SSL_VERSION_LIBRARY",
> -    NULL
> -};
>
>  static void ssl_add_version_components(apr_pool_t *p,
>                                         server_rec *s)
>  {
> -    char *vals[sizeof(version_components)/sizeof(char *)];
> -    int i;
> +    char *modver = ssl_var_lookup(p, s, NULL, NULL,  
> "SSL_VERSION_INTERFACE");
> +    char *libver = ssl_var_lookup(p, s, NULL, NULL,  
> "SSL_VERSION_LIBRARY");
> +    char *incver = ssl_var_lookup(p, s, NULL, NULL,
> +                                  "SSL_VERSION_LIBRARY_INTERFACE");
>
> -    for (i=0; version_components[i]; i++) {
> -        vals[i] = ssl_add_version_component(p, s,
> -                                            version_components[i]);
> -    }
> +    ap_add_version_component(p, modver);
> +    ap_add_version_component(p, libver);
>
>      ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
> -                 "Server: %s, Interface: %s, Library: %s",
> -                 AP_SERVER_BASEVERSION,
> -                 vals[1],  /* SSL_VERSION_INTERFACE */
> -                 vals[2]); /* SSL_VERSION_LIBRARY */
> +                 "%s compiled against Server: %s, Library: %s",
> +                 modver, AP_SERVER_BASEVERSION, incver);
>  }
>
>
>
> Modified: httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_vars.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/ 
> modules/ssl/ssl_engine_vars.c?rev=570419&r1=570418&r2=570419&view=diff
> ====================================================================== 
> ========
> --- httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_vars.c  
> (original)
> +++ httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_vars.c Tue  
> Aug 28 06:40:01 2007
> @@ -635,31 +635,41 @@
>
>  static char *ssl_var_lookup_ssl_version(apr_pool_t *p, char *var)
>  {
> +    static char interface[] = "mod_ssl/" MOD_SSL_VERSION;
> +    static char library_interface[] = SSL_LIBRARY_TEXT;
> +    static char *library = NULL;
>      char *result;
> -    char *cp, *cp2;
> -
> -    result = NULL;
> -
> -    if (strEQ(var, "PRODUCT")) {
> -#if defined(SSL_PRODUCT_NAME) && defined(SSL_PRODUCT_VERSION)
> -        result = apr_psprintf(p, "%s/%s", SSL_PRODUCT_NAME,  
> SSL_PRODUCT_VERSION);
> -#else
> -        result = NULL;
> -#endif
> -    }
> -    else if (strEQ(var, "INTERFACE")) {
> -        result = apr_psprintf(p, "mod_ssl/%s", MOD_SSL_VERSION);
> -    }
> -    else if (strEQ(var, "LIBRARY")) {
> -        result = apr_pstrdup(p, SSLeay_version(SSLEAY_VERSION));
> -        if ((cp = strchr(result, ' ')) != NULL) {
> +
> +    if (!library) {
> +        char *cp, *cp2;
> +        library = apr_pstrdup(p, SSL_LIBRARY_DYNTEXT);
> +        if ((cp = strchr(library, ' ')) != NULL) {
>              *cp = '/';
>              if ((cp2 = strchr(cp, ' ')) != NULL)
>                  *cp2 = NUL;
>          }
> +        if ((cp = strchr(library_interface, ' ')) != NULL) {
> +            *cp = '/';
> +            if ((cp2 = strchr(cp, ' ')) != NULL)
> +                *cp2 = NUL;
> +        }
> +    }
> +
> +    if (strEQ(var, "INTERFACE")) {
> +        result = apr_pstrdup(p, interface);
> +    }
> +    else if (strEQ(var, "LIBRARY_INTERFACE")) {
> +        result = apr_pstrdup(p, library_interface);
> +    }
> +    else if (strEQ(var, "LIBRARY")) {
> +        result = apr_pstrdup(p, library);
> +    }
> +    else {
> +        result = NULL;
>      }
>      return result;
>  }
> +
>
>  const char *ssl_ext_lookup(apr_pool_t *p, conn_rec *c, int peer,
>                             const char *oidnum)
>
> Modified: httpd/httpd/branches/2.2.x/modules/ssl/ssl_util_ssl.h
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/ 
> modules/ssl/ssl_util_ssl.h?rev=570419&r1=570418&r2=570419&view=diff
> ====================================================================== 
> ========
> --- httpd/httpd/branches/2.2.x/modules/ssl/ssl_util_ssl.h (original)
> +++ httpd/httpd/branches/2.2.x/modules/ssl/ssl_util_ssl.h Tue Aug  
> 28 06:40:01 2007
> @@ -37,14 +37,27 @@
>  /**
>   * Determine SSL library version number
>   */
> +#define SSL_NIBBLE(x,n) ((x >> (n * 4)) & 0xF)
> +
>  #ifdef OPENSSL_VERSION_NUMBER
>  #define SSL_LIBRARY_VERSION OPENSSL_VERSION_NUMBER
>  #define SSL_LIBRARY_NAME    "OpenSSL"
>  #define SSL_LIBRARY_TEXT    OPENSSL_VERSION_TEXT
> +#define SSL_LIBRARY_DYNTEXT SSLeay_version(SSLEAY_VERSION)
> +#elif defined(SSLC_VERSION_NUMBER)
> +#define SSL_LIBRARY_VERSION SSLC_VERSION_NUMBER
> +#define SSL_LIBRARY_NAME    "SSL-C"
> +#define SSL_LIBRARY_TEXT    { 'S', 'S', 'L', '-', 'C', ' ', \
> +                              '0' + SSL_NIBBLE(SSLC_VERSION_NUMBER, 
> 3), '.', \
> +                              '0' + SSL_NIBBLE(SSLC_VERSION_NUMBER, 
> 2), '.', \
> +                              '0' + SSL_NIBBLE(SSLC_VERSION_NUMBER, 
> 1), '.', \
> +                              '0' + SSL_NIBBLE(SSLC_VERSION_NUMBER, 
> 0), 0 }
> +#define SSL_LIBRARY_DYNTEXT SSLC_library_info(SSLC_INFO_VERSION)
>  #elif !defined(SSL_LIBRARY_VERSION)
>  #define SSL_LIBRARY_VERSION 0x0000
>  #define SSL_LIBRARY_NAME    "OtherSSL"
>  #define SSL_LIBRARY_TEXT    "OtherSSL 0.0.0 00 XXX 0000"
> +#define SSL_LIBRARY_DYNTEXT "OtherSSL 0.0.0 00 XXX 0000"
>  #endif
>
>  /**
>
>
>
>
>
>