mod_ssl useless CRL object reinitialisation ?

2008-12-23 Thread Nick Gearls

Hello,

In ssl_engine_kernel.c, line 1439 in ssl_callback_SSLVerify_CRL(), we
reinitialise a new CRL by calling object SSL_X509_STORE_lookup().
This was already performed at the beginning of the function.
Couldn't we reuse the first one instead of cleaning it and reusing it ?
I don't see any modification of the structure.

Regards

Nick


Re: svn commit: r729059 - in /httpd/httpd/trunk/modules/mem: ./ .deps Makefile Makefile.in config5.m4 mod_plainmem.c mod_sharedmem.c modules.mk sharedmem_util.c sharedmem_util.h slotmem.h

2008-12-23 Thread Paul Querna

j...@apache.org wrote:

Author: jim
Date: Tue Dec 23 10:39:56 2008
New Revision: 729059

URL: http://svn.apache.org/viewvc?rev=729059view=rev
Log:
Add in the useful slotmem memory module, from httpd-scoreboard.
Cleaned up...



A general question, why now?

This branch:
https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-proxy-scoreboard/

Was last changed 2 years, 4 months ago.

The last discussion on the dev list was 2 years ago:
http://mail-archives.apache.org/mod_mbox/httpd-dev/200612.mbox/%3c1165841856.3167.70.ca...@jfcpc%3e



Added:
httpd/httpd/trunk/modules/mem/
httpd/httpd/trunk/modules/mem/.deps
httpd/httpd/trunk/modules/mem/Makefile   (with props)


You shouldn't need the .deps or Makefiles committed.


httpd/httpd/trunk/modules/mem/Makefile.in   (with props)
httpd/httpd/trunk/modules/mem/config5.m4   (with props)
httpd/httpd/trunk/modules/mem/mod_plainmem.c   (with props)
httpd/httpd/trunk/modules/mem/mod_sharedmem.c   (with props)
httpd/httpd/trunk/modules/mem/modules.mk
httpd/httpd/trunk/modules/mem/sharedmem_util.c   (with props)
httpd/httpd/trunk/modules/mem/sharedmem_util.h   (with props)
httpd/httpd/trunk/modules/mem/slotmem.h   (with props)
Added: httpd/httpd/trunk/modules/mem/mod_plainmem.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/mod_plainmem.c?rev=729059view=auto
==
--- httpd/httpd/trunk/modules/mem/mod_plainmem.c (added)
+++ httpd/httpd/trunk/modules/mem/mod_plainmem.c Tue Dec 23 10:39:56 2008

...

+/* Memory handler for a plain memory divided in slot.
+ * This one uses plain memory.
+ */
+#define CORE_PRIVATE


CORE_PRIVATE was removed from trunk.




Re: svn commit: r729059 - in /httpd/httpd/trunk/modules/mem: ./ .deps Makefile Makefile.in config5.m4 mod_plainmem.c mod_sharedmem.c modules.mk sharedmem_util.c sharedmem_util.h slotmem.h

2008-12-23 Thread Ruediger Pluem


On 12/23/2008 07:39 PM, j...@apache.org wrote:
 Author: jim
 Date: Tue Dec 23 10:39:56 2008
 New Revision: 729059
 
 URL: http://svn.apache.org/viewvc?rev=729059view=rev
 Log:
 Add in the useful slotmem memory module, from httpd-scoreboard.
 Cleaned up...
 
 Added:
 httpd/httpd/trunk/modules/mem/
 httpd/httpd/trunk/modules/mem/.deps
 httpd/httpd/trunk/modules/mem/Makefile   (with props)
 httpd/httpd/trunk/modules/mem/Makefile.in   (with props)
 httpd/httpd/trunk/modules/mem/config5.m4   (with props)
 httpd/httpd/trunk/modules/mem/mod_plainmem.c   (with props)
 httpd/httpd/trunk/modules/mem/mod_sharedmem.c   (with props)
 httpd/httpd/trunk/modules/mem/modules.mk
 httpd/httpd/trunk/modules/mem/sharedmem_util.c   (with props)
 httpd/httpd/trunk/modules/mem/sharedmem_util.h   (with props)
 httpd/httpd/trunk/modules/mem/slotmem.h   (with props)
 
 Added: httpd/httpd/trunk/modules/mem/.deps
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/.deps?rev=729059view=auto
 ==
 (empty)
 
 Added: httpd/httpd/trunk/modules/mem/Makefile
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/Makefile?rev=729059view=auto
 ==
 --- httpd/httpd/trunk/modules/mem/Makefile (added)
 +++ httpd/httpd/trunk/modules/mem/Makefile Tue Dec 23 10:39:56 2008
 @@ -0,0 +1,7 @@
 +top_srcdir   = /Users/jim/src/asf/code/dev/httpd-trunk
 +top_builddir = /Users/jim/src/asf/code/dev/httpd-trunk
 +srcdir   = /Users/jim/src/asf/code/dev/httpd-trunk/modules/mem
 +builddir = /Users/jim/src/asf/code/dev/httpd-trunk/modules/mem
 +VPATH= /Users/jim/src/asf/code/dev/httpd-trunk/modules/mem
 +
 +include $(top_srcdir)/build/special.mk
 
 Propchange: httpd/httpd/trunk/modules/mem/Makefile
 --
 svn:eol-style = native

I deleted the above two files / dirs in r729080 as they get generated during 
build.


 
 Added: httpd/httpd/trunk/modules/mem/config5.m4
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/config5.m4?rev=729059view=auto
 ==
 --- httpd/httpd/trunk/modules/mem/config5.m4 (added)
 +++ httpd/httpd/trunk/modules/mem/config5.m4 Tue Dec 23 10:39:56 2008
 @@ -0,0 +1,14 @@
 +dnl modules enabled in this directory by default
 +
 +dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, 
 config)
 +
 +APACHE_MODPATH_INIT(mem)
 +
 +sharedmem_objs=mod_sharedmem.lo sharedmem_util.lo
 +APACHE_MODULE(sharedmem, memslot provider that uses shared memory, 
 $sharedmem_objs, , most)
 +APACHE_MODULE(plainmem, memslot provider that uses plain memory, , , no)
 +
 +# Ensure that other modules can pick up slotmem.h
 +APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])

Hm. I think this should be in includes if it is intended to be used by other 
stock modules
and at least it needs to be copied to includes during installation.

 +
 +APACHE_MODPATH_FINISH
 
 Propchange: httpd/httpd/trunk/modules/mem/config5.m4
 --
 svn:eol-style = native
 
 Added: httpd/httpd/trunk/modules/mem/mod_plainmem.c
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/mod_plainmem.c?rev=729059view=auto
 ==
 --- httpd/httpd/trunk/modules/mem/mod_plainmem.c (added)
 +++ httpd/httpd/trunk/modules/mem/mod_plainmem.c Tue Dec 23 10:39:56 2008

 +static apr_status_t ap_slotmem_create(ap_slotmem_t **new, const char *name, 
 apr_size_t item_size, int item_num, apr_pool_t *pool)
 +{
 +void *slotmem = NULL;
 +ap_slotmem_t *res;
 +ap_slotmem_t *next = globallistmem;
 +const char *fname;
 +apr_status_t rv;
 +
 +if (name) {
 +if (name[0] == ':')
 +fname = name;
 +else
 +fname = ap_server_root_relative(pool, name);
 +
 +/* first try to attach to existing slotmem */
 +if (next) {
 +for (;;) {
 +if (strcmp(next-name, fname) == 0) {
 +/* we already have it */
 +*new = next;
 +return APR_SUCCESS;
 +}
 +if (!next-next)
 +break;
 +next = next-next;
 +}
 +}
 +} else
 +fname = anonymous;
 +
 +/* create the memory using the globalpool */
 +res = (ap_slotmem_t *) apr_pcalloc(globalpool, sizeof(ap_slotmem_t));
 +res-base =  apr_pcalloc(globalpool, item_size * item_num);
 +if (!res-base)
 +return APR_ENOSHMAVAIL;
 +
 +/* For the chained slotmem stuff */
 +res-name = apr_pstrdup(globalpool, fname);
 +res-size = item_size;
 +