serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1774386 - in /serf/branches/ocsp-verification: ./ buckets/hpack_buckets.c buckets/log_wrapper_buckets.c buckets/mmap_buckets.c buckets/ssl_buckets.c
Date Thu, 15 Dec 2016 08:28:42 GMT
Author: brane
Date: Thu Dec 15 08:28:42 2016
New Revision: 1774386

URL: http://svn.apache.org/viewvc?rev=1774386&view=rev
Log:
On the ocsp-verification branch: Sync with trunk up to r1774385.

Modified:
    serf/branches/ocsp-verification/   (props changed)
    serf/branches/ocsp-verification/buckets/hpack_buckets.c
    serf/branches/ocsp-verification/buckets/log_wrapper_buckets.c
    serf/branches/ocsp-verification/buckets/mmap_buckets.c
    serf/branches/ocsp-verification/buckets/ssl_buckets.c

Propchange: serf/branches/ocsp-verification/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 15 08:28:42 2016
@@ -3,3 +3,4 @@
 /serf/branches/get-remaining:1701859-1708111
 /serf/branches/multiple_ssl_impls:1699382
 /serf/branches/windows-sspi:1698866-1698877
+/serf/trunk:1771884-1774385

Modified: serf/branches/ocsp-verification/buckets/hpack_buckets.c
URL: http://svn.apache.org/viewvc/serf/branches/ocsp-verification/buckets/hpack_buckets.c?rev=1774386&r1=1774385&r2=1774386&view=diff
==============================================================================
--- serf/branches/ocsp-verification/buckets/hpack_buckets.c (original)
+++ serf/branches/ocsp-verification/buckets/hpack_buckets.c Thu Dec 15 08:28:42 2016
@@ -1402,7 +1402,7 @@ handle_read_entry_and_clear(serf_hpack_d
 
     serf__log(LOGLVL_INFO, SERF_LOGCOMP_PROTOCOL, __FILE__, ctx->config,
               "Parsed from HPACK: %.*s: %.*s\n",
-              ctx->key_size, ctx->key, ctx->val_size, ctx->val);
+              (int)ctx->key_size, ctx->key, (int)ctx->val_size, ctx->val);
 
     if (!ctx->headers)
     {

Modified: serf/branches/ocsp-verification/buckets/log_wrapper_buckets.c
URL: http://svn.apache.org/viewvc/serf/branches/ocsp-verification/buckets/log_wrapper_buckets.c?rev=1774386&r1=1774385&r2=1774386&view=diff
==============================================================================
--- serf/branches/ocsp-verification/buckets/log_wrapper_buckets.c (original)
+++ serf/branches/ocsp-verification/buckets/log_wrapper_buckets.c Thu Dec 15 08:28:42 2016
@@ -61,7 +61,7 @@ serf_log_wrapped_readline(serf_bucket_t
         serf__log(LOGLVL_DEBUG, LOGCOMP_CONN, ctx->prefix, ctx->config,
                   "--- %"APR_SIZE_T_FMT" bytes. --\n", *len);
         serf__log(LOGLVL_DEBUG, LOGCOMP_RAWMSG, ctx->prefix, ctx->config,
-                  "%.*s\n", *len, *data);
+                  "%.*s\n", (int)*len, *data);
     }
 
     return status;
@@ -93,7 +93,7 @@ serf_log_wrapped_read_iovec(serf_bucket_
 
     for (i = 0; i < *vecs_used; i++) {
         serf__log_nopref(LOGLVL_DEBUG, LOGCOMP_RAWMSG, ctx->config,
-                         "%.*s", vecs[i].iov_len, vecs[i].iov_base);
+                         "%.*s", (int)vecs[i].iov_len, vecs[i].iov_base);
     }
     serf__log_nopref(LOGLVL_DEBUG, LOGCOMP_RAWMSG, ctx->config, "\n");
 
@@ -116,7 +116,7 @@ serf_log_wrapped_read(serf_bucket_t *buc
         serf__log(LOGLVL_DEBUG, LOGCOMP_CONN, ctx->prefix, ctx->config,
                   "--- %"APR_SIZE_T_FMT" bytes. --\n", *len);
         serf__log(LOGLVL_DEBUG, LOGCOMP_RAWMSG, ctx->prefix, ctx->config,
-                  "%.*s\n", *len, *data);
+                  "%.*s\n", (int)*len, *data);
     }
 
     return status;

Modified: serf/branches/ocsp-verification/buckets/mmap_buckets.c
URL: http://svn.apache.org/viewvc/serf/branches/ocsp-verification/buckets/mmap_buckets.c?rev=1774386&r1=1774385&r2=1774386&view=diff
==============================================================================
--- serf/branches/ocsp-verification/buckets/mmap_buckets.c (original)
+++ serf/branches/ocsp-verification/buckets/mmap_buckets.c Thu Dec 15 08:28:42 2016
@@ -55,7 +55,7 @@ static apr_status_t serf_mmap_read(serf_
 {
     mmap_context_t *ctx = bucket->data;
     apr_status_t status;
-    char *rd;
+    void *rd;
 
     if (requested == SERF_READ_ALL_AVAIL || requested > ctx->remaining) {
         *len = ctx->remaining;
@@ -87,18 +87,19 @@ static apr_status_t serf_mmap_readline(s
 {
     mmap_context_t *ctx = bucket->data;
     apr_status_t status;
-    char *end;
+    const char *eol;
+    void *end;
 
     /* ### Would it be faster to call this once and do the offset ourselves? */
     status = apr_mmap_offset(&end, ctx->mmap, ctx->offset);
     if (SERF_BUCKET_READ_ERROR(status))
         return status;
 
-    *data = end;
+    *data = eol = end;
 
     *len = ctx->remaining;
-    serf_util_readline(&end, len, acceptable, found);
-    *len = end - *data;
+    serf_util_readline(&eol, len, acceptable, found);
+    *len = eol - *data;
 
     ctx->offset += *len;
     ctx->remaining -= *len;
@@ -115,7 +116,7 @@ static apr_status_t serf_mmap_peek(serf_
 {
     mmap_context_t *ctx = bucket->data;
     apr_status_t status;
-    char *rd;
+    void *rd;
 
     /* return whatever we have left */
     status = apr_mmap_offset(&rd, ctx->mmap, ctx->offset);

Modified: serf/branches/ocsp-verification/buckets/ssl_buckets.c
URL: http://svn.apache.org/viewvc/serf/branches/ocsp-verification/buckets/ssl_buckets.c?rev=1774386&r1=1774385&r2=1774386&view=diff
==============================================================================
--- serf/branches/ocsp-verification/buckets/ssl_buckets.c (original)
+++ serf/branches/ocsp-verification/buckets/ssl_buckets.c Thu Dec 15 08:28:42 2016
@@ -1134,7 +1134,7 @@ static apr_status_t ssl_decrypt(void *ba
         *len = ssl_len;
         status = ctx->crypt_status;
         serf__log(LOGLVL_DEBUG, LOGCOMP_SSLMSG, __FILE__, ctx->config,
-                    "---\n%.*s\n-(%"APR_SIZE_T_FMT")-\n", *len, buf, *len);
+                  "---\n%.*s\n-(%"APR_SIZE_T_FMT")-\n", (int)*len, buf, *len);
     }
 
 
@@ -1301,7 +1301,7 @@ static apr_status_t ssl_encrypt(void *ba
 
                     serf__log(LOGLVL_DEBUG, LOGCOMP_SSL, __FILE__, ctx->config,
                               "---\n%.*s\n-(%"APR_SIZE_T_FMT")-\n",
-                              interim_len, vecs_data, interim_len);
+                              (int)interim_len, vecs_data, interim_len);
 
                 }
             }
@@ -1938,6 +1938,12 @@ static const char *ssl_get_selected_prot
     return context->selected_protocol;
 }
 
+/* Pool cleanup function for certificates */
+static apr_status_t free_ssl_cert(void *data)
+{
+    X509_free(data);
+    return APR_SUCCESS;
+}
 
 apr_status_t serf_ssl_use_default_certificates(serf_ssl_context_t *ssl_ctx)
 {
@@ -1981,10 +1987,12 @@ apr_status_t serf_ssl_load_cert_file(
     bio_meth_free(biom);
 
     if (ssl_cert) {
-        /* TODO: Setup pool cleanup to free certificate */
         *cert = apr_palloc(pool, sizeof(serf_ssl_certificate_t));
         (*cert)->ssl_cert = ssl_cert;
 
+        apr_pool_cleanup_register(pool, ssl_cert, free_ssl_cert,
+                                  apr_pool_cleanup_null);
+
         return APR_SUCCESS;
     }
 #if 0



Mime
View raw message