httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r907918 - in /httpd/httpd/trunk/modules/ssl: ssl_engine_kernel.c ssl_private.h ssl_scache.c ssl_util_stapling.c
Date Tue, 09 Feb 2010 03:44:05 GMT
Author: wrowe
Date: Tue Feb  9 03:44:04 2010
New Revision: 907918

URL: http://svn.apache.org/viewvc?rev=907918&view=rev
Log:
Catch up ssl to socache store expiry change, and clarify what the code is doing

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c
    httpd/httpd/trunk/modules/ssl/ssl_private.h
    httpd/httpd/trunk/modules/ssl/ssl_scache.c
    httpd/httpd/trunk/modules/ssl/ssl_util_stapling.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c?rev=907918&r1=907917&r2=907918&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c Tue Feb  9 03:44:04 2010
@@ -1812,9 +1812,10 @@
     id = SSL_SESSION_get_session_id(session);
     idlen = SSL_SESSION_get_session_id_length(session);
 
-    timeout += modssl_session_get_time(session);
-
-    rc = ssl_scache_store(s, id, idlen, timeout, session, conn->pool);
+    rc = ssl_scache_store(s, id, idlen,
+                          apr_time_from_sec(modssl_session_get_time(session)
+                                          + timeout),
+                          session, conn->pool);
 
     ssl_session_log(s, "SET", id, idlen,
                     rc == TRUE ? "OK" : "BAD",

Modified: httpd/httpd/trunk/modules/ssl/ssl_private.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_private.h?rev=907918&r1=907917&r2=907918&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_private.h (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_private.h Tue Feb  9 03:44:04 2010
@@ -642,7 +642,7 @@
 void         ssl_scache_status_register(apr_pool_t *p);
 void         ssl_scache_kill(server_rec *);
 BOOL         ssl_scache_store(server_rec *, UCHAR *, int,
-                              time_t, SSL_SESSION *, apr_pool_t *);
+                              apr_time_t, SSL_SESSION *, apr_pool_t *);
 SSL_SESSION *ssl_scache_retrieve(server_rec *, UCHAR *, int, apr_pool_t *);
 void         ssl_scache_remove(server_rec *, UCHAR *, int,
                                apr_pool_t *);

Modified: httpd/httpd/trunk/modules/ssl/ssl_scache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache.c?rev=907918&r1=907917&r2=907918&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache.c Tue Feb  9 03:44:04 2010
@@ -113,7 +113,7 @@
 }
 
 BOOL ssl_scache_store(server_rec *s, UCHAR *id, int idlen,
-                      time_t expiry, SSL_SESSION *sess,
+                      apr_time_t expiry, SSL_SESSION *sess,
                       apr_pool_t *p)
 {
     SSLModConfigRec *mc = myModConfig(s);

Modified: httpd/httpd/trunk/modules/ssl/ssl_util_stapling.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_util_stapling.c?rev=907918&r1=907917&r2=907918&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util_stapling.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util_stapling.c Tue Feb  9 03:44:04 2010
@@ -184,7 +184,7 @@
     unsigned char *p;
     int resp_derlen;
     BOOL rv;
-    time_t timeout;
+    apr_time_t expiry;
 
     resp_derlen = i2d_OCSP_RESPONSE(rsp, NULL) + 1;
 
@@ -200,25 +200,25 @@
         return FALSE;
     }
 
-
     p = resp_der;
 
+    /* TODO: potential optimization; _timeout members as apr_interval_time_t */
     if (ok == TRUE) {
         *p++ = 1;
-        timeout = mctx->stapling_cache_timeout;
+        expiry = apr_time_from_sec(mctx->stapling_cache_timeout);
     } 
     else {
         *p++ = 0;
-        timeout = mctx->stapling_errcache_timeout;
+        expiry = apr_time_from_sec(mctx->stapling_errcache_timeout);
     }
 
-    timeout += apr_time_sec(apr_time_now());
+    expiry += apr_time_now();
 
     i2d_OCSP_RESPONSE(rsp, &p);
 
     rv = mc->stapling_cache->store(mc->stapling_cache_context, s,
                                    cinf->idx, sizeof(cinf->idx),
-                                   timeout, resp_der, resp_derlen, pool);
+                                   expiry, resp_der, resp_derlen, pool);
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
                      "stapling_cache_response: OCSP response session store error!");



Mime
View raw message