httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r683242 - in /httpd/httpd/trunk/modules/ssl: ssl_engine_ocsp.c ssl_util_ocsp.c
Date Wed, 06 Aug 2008 12:14:00 GMT
Author: jorton
Date: Wed Aug  6 05:14:00 2008
New Revision: 683242

URL: http://svn.apache.org/viewvc?rev=683242&view=rev
Log:
Relax checks for OCSP responder URIs:

* modules/ssl/ssl_engine_ocsp.c (determine_responder_uri): Allow
  NULL path; use default port for given schem.

* modules/ssl/ssl_util_ocsp.c (serialize_request): Use / if no path
  specified.

Submitted by: Kaspar Brand <asfbugz velox.ch>
PR: 45522

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_engine_ocsp.c
    httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_ocsp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_ocsp.c?rev=683242&r1=683241&r2=683242&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_ocsp.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_ocsp.c Wed Aug  6 05:14:00 2008
@@ -80,7 +80,7 @@
     }
 
     rv = apr_uri_parse(p, s, u);
-    if (rv || !u->hostname || !u->path) {    
+    if (rv || !u->hostname) {    
         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, 
                       "failed to parse OCSP responder URI '%s'", s);
         return NULL;
@@ -92,6 +92,10 @@
         return NULL;
     }
 
+    if (!u->port) {
+        u->port = apr_uri_port_of_scheme(u->scheme);
+    }
+
     return u;
 }
 

Modified: httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c?rev=683242&r1=683241&r2=683242&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c Wed Aug  6 05:14:00 2008
@@ -40,7 +40,8 @@
                "Host: %s:%d\r\n"
                "Content-Length: %d\r\n"
                "\r\n", 
-               uri->path, uri->query ? "?" : "", uri->query ? uri->query : "",
+               uri->path ? uri->path : "/",
+               uri->query ? "?" : "", uri->query ? uri->query : "",
                uri->hostname, uri->port, len);
 
     if (i2d_OCSP_REQUEST_bio(bio, req) != 1) {



Mime
View raw message