[rs-commit] r237 - in /mod_ca/trunk: mod_ca_crl.c mod_ca_disk.c
rs-commit at redwax.eu
rs-commit at redwax.eu
Sat Jan 4 23:32:40 CET 2020
Author: minfrin at redwax.eu
Date: Sat Jan 4 23:32:39 2020
New Revision: 237
Log:
Remove further references to ap_state_query().
Modified:
mod_ca/trunk/mod_ca_crl.c
mod_ca/trunk/mod_ca_disk.c
Modified: mod_ca/trunk/mod_ca_crl.c
==============================================================================
--- mod_ca/trunk/mod_ca_crl.c (original)
+++ mod_ca/trunk/mod_ca_crl.c Sat Jan 4 23:32:39 2020
@@ -365,13 +365,6 @@
const ASN1_TIME *nextupdate;
apr_int64_t i;
- /* set_crl() will be called twice. Don't bother
- * going through all of the initialization on the first call
- * because it will just be thrown away.*/
- if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) {
- return NULL;
- }
-
arg = ap_server_root_relative(cmd->pool, arg);
in = BIO_new(BIO_s_file());
Modified: mod_ca/trunk/mod_ca_disk.c
==============================================================================
--- mod_ca/trunk/mod_ca_disk.c (original)
+++ mod_ca/trunk/mod_ca_disk.c Sat Jan 4 23:32:39 2020
@@ -102,7 +102,7 @@
#define NEW_NIDS 1
static niddef_t scep_oid_def[NEW_NIDS] =
{
-{ 0, "2.16.840.1.113733.1.9.7", "transactionID", "transactionID" } };
+{ -1, "2.16.840.1.113733.1.9.7", "transactionID", "transactionID" } };
static unsigned long index_serial_hash(const OPENSSL_CSTRING *a)
{
@@ -1381,9 +1381,9 @@
apr_pool_cleanup_register(pconf, NULL, ca_cleanup, apr_pool_cleanup_null);
/* define the new object definitions needed for SCEP */
- if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_CONFIG) {
- int i;
- for (i = 0; i < NEW_NIDS; i++) {
+ int i;
+ for (i = 0; i < NEW_NIDS; i++) {
+ if (scep_oid_def[i].nid == -1) {
scep_oid_def[i].nid = OBJ_create(scep_oid_def[i].oid,
scep_oid_def[i].name1, scep_oid_def[i].name2);
}
@@ -1397,13 +1397,8 @@
{
apr_status_t rs;
- /*
- * Do nothing if we are not creating the final configuration.
- * The parent process gets initialized a couple of times as the
- * server starts up, and we don't want to create any more mutexes
- * and shared memory segments than we're actually going to use.
- */
- if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) {
+ /* if the mutex already exists, as it would after a restart, reuse */
+ if (ca_disk_mutex) {
return OK;
}
More information about the rs-commit
mailing list