]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Port ssl_engine_ds.c to APR.
authorRalf S. Engelschall <rse@apache.org>
Sat, 5 May 2001 19:53:00 +0000 (19:53 +0000)
committerRalf S. Engelschall <rse@apache.org>
Sat, 5 May 2001 19:53:00 +0000 (19:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@89026 13f79535-47bb-0310-9956-ffa450edef68

README
mod_ssl.h
ssl_engine_ds.c

diff --git a/README b/README
index 29f4e213c90be298a553e021ef7beb9f976987bb..c32ba52994b3208d080bf86a575c8e695a3a713f 100644 (file)
--- a/README
+++ b/README
@@ -29,7 +29,7 @@
  - mod_ssl.h ............... common header file of mod_ssl
  - ssl_engine_config.c ..... module configuration handling
  # ssl_engine_dh.c ......... DSA/DH support
- ssl_engine_ds.c ......... data structures
# ssl_engine_ds.c ......... data structures
  - ssl_engine_ext.c ........ Extensions to other Apache parts
  - ssl_engine_init.c ....... module initialization
  - ssl_engine_io.c ......... I/O support
index 16185caee9c2dad64b782e5d52b3f82950bb85ff..4681b788e0a5023769428262379b62f81df49797 100644 (file)
--- a/mod_ssl.h
+++ b/mod_ssl.h
 #include "apr.h"
 #include "apr_fnmatch.h"
 #include "apr_strings.h"
+#include "apr_pools.h"
+#include "apr_tables.h"
 #undef CORE_PRIVATE
 
 /* mod_ssl headers */
 
 #define myCtxVarSet(mc,num,val)  mc->rCtx.pV##num = val
 #define myCtxVarGet(mc,num,type) (type)(mc->rCtx.pV##num)
+#endif /* XXX */
 
 /*
  * SSL Logging
  * The own data structures
  */
 typedef struct {
-    pool *pPool;
-    pool *pSubPool;
-    array_header *aData;
+    apr_pool_t *pPool;
+    apr_pool_t *pSubPool;
+    apr_array_header_t *aData;
 } ssl_ds_array;
 
 typedef struct {
-    pool *pPool;
-    pool *pSubPool;
-    array_header *aKey;
-    array_header *aData;
+    apr_pool_t *pPool;
+    apr_pool_t *pSubPool;
+    apr_array_header_t *aKey;
+    apr_array_header_t *aData;
 } ssl_ds_table;
 
 /*
  * Define the certificate algorithm types
  */
 
+#if 0 /* XXX */
+
 typedef int ssl_algo_t;
 
 #define SSL_ALGO_UNKNOWN (0)
@@ -635,13 +640,13 @@ DH           *ssl_dh_GetTmpParam(int);
 DH           *ssl_dh_GetParamFromFile(char *);
 
 /*  Data Structures */
-ssl_ds_array *ssl_ds_array_make(pool *, int);
+ssl_ds_array *ssl_ds_array_make(apr_pool_t *, int);
 BOOL          ssl_ds_array_isempty(ssl_ds_array *);
 void         *ssl_ds_array_push(ssl_ds_array *);
 void         *ssl_ds_array_get(ssl_ds_array *, int);
 void          ssl_ds_array_wipeout(ssl_ds_array *);
 void          ssl_ds_array_kill(ssl_ds_array *);
-ssl_ds_table *ssl_ds_table_make(pool *, int);
+ssl_ds_table *ssl_ds_table_make(apr_pool_t *, int);
 BOOL          ssl_ds_table_isempty(ssl_ds_table *);
 void         *ssl_ds_table_push(ssl_ds_table *, char *);
 void         *ssl_ds_table_get(ssl_ds_table *, char *);
index 975646e869ff2877650a7c7fbcfaa71a54bb4296..25fdf20c15fb8d19d74e288a8b5765c8358136c9 100644 (file)
                                          -- Unknown         */
 #include "mod_ssl.h"
 
-#if 0 /* XXX */
-
 /*  _________________________________________________________________
 **
 **  Data Structures which store _arbitrary_ data
 **  _________________________________________________________________
 */
 
-ssl_ds_array *ssl_ds_array_make(pool *p, int size)
+ssl_ds_array *ssl_ds_array_make(apr_pool_t *p, int size)
 {
     ssl_ds_array *a;
 
-    if ((a = (ssl_ds_array *)ap_palloc(p, sizeof(ssl_ds_array))) == NULL)
+    if ((a = (ssl_ds_array *)apr_palloc(p, sizeof(ssl_ds_array))) == NULL)
         return NULL;
     a->pPool = p;
-    if ((a->pSubPool = ap_make_sub_pool(p)) == NULL)
+    if ((a->pSubPool = apr_pool_sub_make(p, NULL)) != APR_SUCCESS)
         return NULL;
-    a->aData   = ap_make_array(a->pSubPool, 2, size);
+    a->aData = apr_array_make(a->pSubPool, 2, size);
     return a;
 }
 
@@ -96,7 +94,7 @@ void *ssl_ds_array_push(ssl_ds_array *a)
 {
     void *d;
 
-    d = (void *)ap_push_array(a->aData);
+    d = (void *)apr_array_push(a->aData);
     return d;
 }
 
@@ -119,23 +117,23 @@ void ssl_ds_array_wipeout(ssl_ds_array *a)
 
 void ssl_ds_array_kill(ssl_ds_array *a)
 {
-    ap_destroy_pool(a->pSubPool);
+    apr_pool_destroy(a->pSubPool);
     a->pSubPool = NULL;
     a->aData    = NULL;
     return;
 }
 
-ssl_ds_table *ssl_ds_table_make(pool *p, int size)
+ssl_ds_table *ssl_ds_table_make(apr_pool_t *p, int size)
 {
     ssl_ds_table *t;
 
-    if ((t = (ssl_ds_table *)ap_palloc(p, sizeof(ssl_ds_table))) == NULL)
+    if ((t = (ssl_ds_table *)apr_palloc(p, sizeof(ssl_ds_table))) == NULL)
         return NULL;
     t->pPool = p;
-    if ((t->pSubPool = ap_make_sub_pool(p)) == NULL)
+    if ((t->pSubPool = apr_pool_sub_make(p, NULL)) != APR_SUCCESS)
         return NULL;
-    t->aKey  = ap_make_array(t->pSubPool, 2, MAX_STRING_LEN);
-    t->aData = ap_make_array(t->pSubPool, 2, size);
+    t->aKey  = apr_array_make(t->pSubPool, 2, MAX_STRING_LEN);
+    t->aData = apr_array_make(t->pSubPool, 2, size);
     return t;
 }
 
@@ -152,9 +150,9 @@ void *ssl_ds_table_push(ssl_ds_table *t, char *key)
     char *k;
     void *d;
 
-    k = (char *)ap_push_array(t->aKey);
-    d = (void *)ap_push_array(t->aData);
-    ap_cpystrn(k, key, t->aKey->elt_size);
+    k = (char *)apr_array_push(t->aKey);
+    d = (void *)apr_array_push(t->aData);
+    apr_cpystrn(k, key, t->aKey->elt_size);
     return d;
 }
 
@@ -186,12 +184,10 @@ void ssl_ds_table_wipeout(ssl_ds_table *t)
 
 void ssl_ds_table_kill(ssl_ds_table *t)
 {
-    ap_destroy_pool(t->pSubPool);
+    apr_pool_destroy(t->pSubPool);
     t->pSubPool = NULL;
     t->aKey     = NULL;
     t->aData    = NULL;
     return;
 }
 
-#endif /* XXX */
-