[rs-commit] r133 - in /mod_ca/trunk: ChangeLog mod_ca_crl.c mod_ca_disk.c mod_ca_engine.c mod_ca_ldap.c mod_ca_simple.c

rs-commit at redwax.eu rs-commit at redwax.eu
Sat Nov 2 01:29:43 CET 2019


Author: minfrin at redwax.eu
Date: Sat Nov  2 01:29:42 2019
New Revision: 133

Log:
Alphabetise the hook implemetations to make them easier to document.

Modified:
    mod_ca/trunk/ChangeLog
    mod_ca/trunk/mod_ca_crl.c
    mod_ca/trunk/mod_ca_disk.c
    mod_ca/trunk/mod_ca_engine.c
    mod_ca/trunk/mod_ca_ldap.c
    mod_ca/trunk/mod_ca_simple.c

Modified: mod_ca/trunk/ChangeLog
==============================================================================
--- mod_ca/trunk/ChangeLog	(original)
+++ mod_ca/trunk/ChangeLog	Sat Nov  2 01:29:42 2019
@@ -1,5 +1,8 @@
 
 Changes with v0.2.0
+
+ *) Alphabetise the hook implemetations to make them easier to
+    document. [Graham Leggett]
 
  *) Make sure that extensions are added with X509V3_CTX.
     [Graham Leggett]

Modified: mod_ca/trunk/mod_ca_crl.c
==============================================================================
--- mod_ca/trunk/mod_ca_crl.c	(original)
+++ mod_ca/trunk/mod_ca_crl.c	Sat Nov  2 01:29:42 2019
@@ -195,7 +195,7 @@
     return 0;
 }
 
-static int ca_getcrl(request_rec *r, const unsigned char **crl, apr_size_t *len,
+static int ca_getcrl_crl(request_rec *r, const unsigned char **crl, apr_size_t *len,
         apr_time_t *validity)
 {
 
@@ -216,7 +216,7 @@
     return OK;
 }
 
-static int ca_getcertstatus(request_rec *r, apr_hash_t *certstatus,
+static int ca_getcertstatus_crl(request_rec *r, apr_hash_t *certstatus,
         apr_time_t *validity)
 {
     ca_asn1_t *serial;
@@ -453,8 +453,8 @@
 {
     ap_hook_pre_config(ca_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
 
-    ap_hook_ca_getcrl(ca_getcrl, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_getcertstatus(ca_getcertstatus, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getcrl(ca_getcrl_crl, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getcertstatus(ca_getcertstatus_crl, NULL, NULL, APR_HOOK_MIDDLE);
 
 }
 

Modified: mod_ca/trunk/mod_ca_disk.c
==============================================================================
--- mod_ca/trunk/mod_ca_disk.c	(original)
+++ mod_ca/trunk/mod_ca_disk.c	Sat Nov  2 01:29:42 2019
@@ -294,7 +294,7 @@
     return n;
 }
 
-static int ca_disk_sign(request_rec *r, apr_hash_t *params,
+static int ca_sign_disk(request_rec *r, apr_hash_t *params,
         const unsigned char **buffer, apr_size_t *len)
 {
     X509_REQ *creq = NULL;
@@ -432,7 +432,7 @@
     return DONE;
 }
 
-static int ca_disk_certstore(request_rec *r, apr_hash_t *params,
+static int ca_certstore_disk(request_rec *r, apr_hash_t *params,
         const unsigned char *buffer, apr_size_t len)
 {
     const unsigned char *tmp = buffer;
@@ -648,7 +648,7 @@
     return OK;
 }
 
-static int ca_disk_getcert(request_rec *r, apr_hash_t *search,
+static int ca_getcert_disk(request_rec *r, apr_hash_t *search,
         const unsigned char **buffer, apr_size_t *len)
 {
     ca_asn1_t *serial;
@@ -915,7 +915,7 @@
     return OK;
 }
 
-static int ca_disk_makeserialnext(request_rec *r, apr_hash_t *params,
+static int ca_makeserial_disk(request_rec *r, apr_hash_t *params,
         const unsigned char **serial, apr_size_t *len)
 {
     apr_status_t status;
@@ -1450,10 +1450,10 @@
     ap_hook_child_init(ca_disk_child_init, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_post_config(ca_disk_post_config, NULL, NULL, APR_HOOK_MIDDLE);
 
-    ap_hook_ca_sign(ca_disk_sign, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_certstore(ca_disk_certstore, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_getcert(ca_disk_getcert, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_makeserial(ca_disk_makeserialnext, NULL, NULL,
+    ap_hook_ca_sign(ca_sign_disk, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_certstore(ca_certstore_disk, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getcert(ca_getcert_disk, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_makeserial(ca_makeserial_disk, NULL, NULL,
             APR_HOOK_MIDDLE);
 
 }

Modified: mod_ca/trunk/mod_ca_engine.c
==============================================================================
--- mod_ca/trunk/mod_ca_engine.c	(original)
+++ mod_ca/trunk/mod_ca_engine.c	Sat Nov  2 01:29:42 2019
@@ -247,7 +247,7 @@
     return 0;
 }
 
-int ca_engine_sign(request_rec *r, apr_hash_t *params,
+int ca_sign_engine(request_rec *r, apr_hash_t *params,
         const unsigned char **buffer, apr_size_t *len)
 {
     X509V3_CTX ext_ctx;
@@ -537,7 +537,7 @@
     return OK;
 }
 
-int ca_engine_getca(request_rec *r, const unsigned char **cacert,
+int ca_getca_engine(request_rec *r, const unsigned char **cacert,
         apr_size_t *len, apr_time_t *validity)
 {
 
@@ -558,7 +558,7 @@
     return OK;
 }
 
-int ca_engine_getnextca(request_rec *r, const unsigned char **cacert,
+int ca_getnextca_engine(request_rec *r, const unsigned char **cacert,
         apr_size_t *len, apr_time_t *validity)
 {
 
@@ -579,7 +579,7 @@
     return OK;
 }
 
-int ca_engine_getchain(request_rec *r, const unsigned char **chain,
+int ca_getchain_engine(request_rec *r, const unsigned char **chain,
         apr_size_t *len, apr_time_t *validity)
 {
 
@@ -1058,10 +1058,10 @@
     ap_hook_pre_config(ca_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_child_init(ca_engine_init_child, NULL,NULL, APR_HOOK_MIDDLE);
 
-    ap_hook_ca_sign(ca_engine_sign, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_getca(ca_engine_getca, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_getnextca(ca_engine_getnextca, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_getchain(ca_engine_getchain, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_sign(ca_sign_engine, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getca(ca_getca_engine, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getnextca(ca_getnextca_engine, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getchain(ca_getchain_engine, NULL, NULL, APR_HOOK_MIDDLE);
 
 }
 

Modified: mod_ca/trunk/mod_ca_ldap.c
==============================================================================
--- mod_ca/trunk/mod_ca_ldap.c	(original)
+++ mod_ca/trunk/mod_ca_ldap.c	Sat Nov  2 01:29:42 2019
@@ -318,7 +318,7 @@
     return rc;
 }
 
-static int ca_ldap_reqauthz(request_rec *r, apr_hash_t *params,
+static int ca_reqauthz_ldap(request_rec *r, apr_hash_t *params,
         const unsigned char *buffer, apr_size_t len)
 {
     ca_ldap_ldc_rec *l = NULL;
@@ -720,7 +720,7 @@
     return OK;
 }
 
-static int ca_ldap_certstore(request_rec *r, apr_hash_t *params,
+static int ca_certstore_ldap(request_rec *r, apr_hash_t *params,
         const unsigned char *buffer, apr_size_t len)
 {
     void *data;
@@ -1363,8 +1363,8 @@
 {
     ap_hook_pre_config(ca_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
 
-    ap_hook_ca_reqauthz(ca_ldap_reqauthz, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_certstore(ca_ldap_certstore, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_reqauthz(ca_reqauthz_ldap, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_certstore(ca_certstore_ldap, NULL, NULL, APR_HOOK_MIDDLE);
 
     ap_hook_optional_fn_retrieve(ca_optional_fn_retrieve, NULL, NULL,
             APR_HOOK_MIDDLE);

Modified: mod_ca/trunk/mod_ca_simple.c
==============================================================================
--- mod_ca/trunk/mod_ca_simple.c	(original)
+++ mod_ca/trunk/mod_ca_simple.c	Sat Nov  2 01:29:42 2019
@@ -251,7 +251,7 @@
     return 0;
 }
 
-int ca_simple_sign(request_rec *r, apr_hash_t *params,
+int ca_sign_simple(request_rec *r, apr_hash_t *params,
         const unsigned char **buffer, apr_size_t *len)
 {
     X509V3_CTX ext_ctx;
@@ -534,7 +534,7 @@
     return OK;
 }
 
-int ca_simple_getca(request_rec *r, const unsigned char **cacert,
+int ca_getca_simple(request_rec *r, const unsigned char **cacert,
         apr_size_t *len, apr_time_t *validity)
 {
 
@@ -555,7 +555,7 @@
     return OK;
 }
 
-int ca_simple_getnextca(request_rec *r, const unsigned char **cacert,
+int ca_getnextca_simple(request_rec *r, const unsigned char **cacert,
         apr_size_t *len, apr_time_t *validity)
 {
 
@@ -576,7 +576,7 @@
     return OK;
 }
 
-int ca_simple_getchain(request_rec *r, const unsigned char **chain,
+int ca_getchain_simple(request_rec *r, const unsigned char **chain,
         apr_size_t *len, apr_time_t *validity)
 {
 
@@ -597,7 +597,7 @@
     return OK;
 }
 
-static int ca_simple_makeserial_subject(request_rec *r, apr_hash_t *params,
+static int ca_makeserial_simple_subject(request_rec *r, apr_hash_t *params,
         const unsigned char **serial, apr_size_t *len)
 {
     ca_asn1_t *subject;
@@ -680,7 +680,7 @@
     return OK;
 }
 
-static int ca_simple_makeserial_random(request_rec *r, apr_hash_t *params,
+static int ca_makeserial_simple_random(request_rec *r, apr_hash_t *params,
         const unsigned char **serial, apr_size_t *len)
 {
     ASN1_INTEGER *sno = NULL;
@@ -732,7 +732,7 @@
     return OK;
 }
 
-static int ca_simple_gettime(request_rec *r, apr_time_t *time,
+static int ca_gettime_simple(request_rec *r, apr_time_t *time,
         apr_interval_time_t *as, apr_interval_time_t *ams,
         apr_interval_time_t *amicro)
 {
@@ -761,7 +761,7 @@
     return OK;
 }
 
-static int ca_simple_makekey(request_rec *r, apr_hash_t *params,
+static int ca_makekey_simple(request_rec *r, apr_hash_t *params,
         const unsigned char **key, apr_size_t *len)
 {
     ca_config_rec *conf = ap_get_module_config(r->per_dir_config,
@@ -1271,17 +1271,17 @@
 {
     ap_hook_pre_config(ca_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
 
-    ap_hook_ca_sign(ca_simple_sign, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_getca(ca_simple_getca, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_getnextca(ca_simple_getnextca, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_getchain(ca_simple_getchain, NULL, NULL, APR_HOOK_MIDDLE);
-    ap_hook_ca_makeserial(ca_simple_makeserial_subject, NULL, NULL,
+    ap_hook_ca_sign(ca_sign_simple, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getca(ca_getca_simple, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getnextca(ca_getnextca_simple, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_getchain(ca_getchain_simple, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_ca_makeserial(ca_makeserial_simple_subject, NULL, NULL,
             APR_HOOK_MIDDLE);
-    ap_hook_ca_makeserial(ca_simple_makeserial_random, NULL, NULL,
+    ap_hook_ca_makeserial(ca_makeserial_simple_random, NULL, NULL,
             APR_HOOK_LAST);
-    ap_hook_ca_makekey(ca_simple_makekey, NULL, NULL,
+    ap_hook_ca_makekey(ca_makekey_simple, NULL, NULL,
             APR_HOOK_LAST);
-    ap_hook_ca_gettime(ca_simple_gettime, NULL, NULL, APR_HOOK_LAST);
+    ap_hook_ca_gettime(ca_gettime_simple, NULL, NULL, APR_HOOK_LAST);
 
 }
 



More information about the rs-commit mailing list