You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2022/05/06 13:16:36 UTC

svn commit: r1900629 - in /httpd/httpd/branches/2.4.x: ./ changes-entries/md_ocsp_update.txt modules/md/md_curl.c modules/md/md_ocsp.c modules/md/md_version.h

Author: icing
Date: Fri May  6 13:16:36 2022
New Revision: 1900629

URL: http://svn.apache.org/viewvc?rev=1900629&view=rev
Log:
Merge /httpd/httpd/trunk:r1900628

  *) mod_md:  fixed a bug leading to failed transfers for OCSP
     stapling information when more than 6 certificates needed
     updates in the same run.


Added:
    httpd/httpd/branches/2.4.x/changes-entries/md_ocsp_update.txt
      - copied unchanged from r1900628, httpd/httpd/trunk/changes-entries/md_ocsp_update.txt
Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/modules/md/md_curl.c
    httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c
    httpd/httpd/branches/2.4.x/modules/md/md_version.h

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1900628

Modified: httpd/httpd/branches/2.4.x/modules/md/md_curl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/md/md_curl.c?rev=1900629&r1=1900628&r2=1900629&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/md/md_curl.c (original)
+++ httpd/httpd/branches/2.4.x/modules/md/md_curl.c Fri May  6 13:16:36 2022
@@ -251,17 +251,18 @@ static apr_status_t internals_setup(md_h
             rv = APR_EGENERAL;
             goto leave;
         }
-        curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_cb);
-        curl_easy_setopt(curl, CURLOPT_HEADERDATA, NULL);
-        curl_easy_setopt(curl, CURLOPT_READFUNCTION, req_data_cb);
-        curl_easy_setopt(curl, CURLOPT_READDATA, NULL);
-        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, resp_data_cb);
-        curl_easy_setopt(curl, CURLOPT_WRITEDATA, NULL);
     }
     else {
         md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, req->pool, "reusing curl instance from http");
     }
 
+    curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_cb);
+    curl_easy_setopt(curl, CURLOPT_HEADERDATA, NULL);
+    curl_easy_setopt(curl, CURLOPT_READFUNCTION, req_data_cb);
+    curl_easy_setopt(curl, CURLOPT_READDATA, NULL);
+    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, resp_data_cb);
+    curl_easy_setopt(curl, CURLOPT_WRITEDATA, NULL);
+
     internals = apr_pcalloc(req->pool, sizeof(*internals));
     internals->curl = curl;
         
@@ -354,6 +355,9 @@ static apr_status_t update_status(md_htt
         rv = curl_status(curl_easy_getinfo(internals->curl, CURLINFO_RESPONSE_CODE, &l));
         if (APR_SUCCESS == rv) {
             internals->response->status = (int)l;
+            md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, rv, req->pool,
+                          "req[%d]: http status is %d",
+                          req->id, internals->response->status);
         }
     }
     return rv;
@@ -579,19 +583,7 @@ static void md_curl_req_cleanup(md_http_
     md_curl_internals_t *internals = req->internals;
     if (internals) {
         if (internals->curl) {
-            CURL *curl = md_http_get_impl_data(req->http);
-            if (curl == internals->curl) {
-                /* NOP: we have this curl at the md_http_t already */
-            }
-            else if (!curl) {
-                /* no curl at the md_http_t yet, install this one */
-                md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, req->pool, "register curl instance at http");
-                md_http_set_impl_data(req->http, internals->curl);
-            }
-            else {
-                /* There already is a curl at the md_http_t and it's not this one. */
-                curl_easy_cleanup(internals->curl);
-            }
+            curl_easy_cleanup(internals->curl);
         }
         if (internals->req_hdrs) curl_slist_free_all(internals->req_hdrs);
         req->internals = NULL;

Modified: httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c?rev=1900629&r1=1900628&r2=1900629&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c (original)
+++ httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c Fri May  6 13:16:36 2022
@@ -837,8 +837,8 @@ static apr_status_t next_todo(md_http_re
             md_http_set_on_response_cb(req, ostat_on_resp, update);
             rv = APR_SUCCESS;
             md_log_perror(MD_LOG_MARK, MD_LOG_TRACE2, 0, req->pool,
-                          "scheduling OCSP request for %s, %d request in flight",
-                          ostat->md_name, in_flight);
+                          "scheduling OCSP request[%d] for %s, %d request in flight",
+                          req->id, ostat->md_name, in_flight);
         }
     }
 cleanup:

Modified: httpd/httpd/branches/2.4.x/modules/md/md_version.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/md/md_version.h?rev=1900629&r1=1900628&r2=1900629&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/md/md_version.h (original)
+++ httpd/httpd/branches/2.4.x/modules/md/md_version.h Fri May  6 13:16:36 2022
@@ -27,7 +27,7 @@
  * @macro
  * Version number of the md module as c string
  */
-#define MOD_MD_VERSION "2.4.14"
+#define MOD_MD_VERSION "2.4.15"
 
 /**
  * @macro
@@ -35,7 +35,7 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define MOD_MD_VERSION_NUM 0x02040e
+#define MOD_MD_VERSION_NUM 0x02040f
 
 #define MD_ACME_DEF_URL         "https://acme-v02.api.letsencrypt.org/directory"
 #define MD_TAILSCALE_DEF_URL    "file://localhost/var/run/tailscale/tailscaled.sock"