[rs-commit] r45 - /mod_csr/trunk/mod_csr.c

rs-commit at redwax.eu rs-commit at redwax.eu
Fri Apr 19 23:53:19 CEST 2019


Author: minfrin at redwax.eu
Date: Fri Apr 19 23:53:19 2019
New Revision: 45

Log:
Tab to space.

Modified:
    mod_csr/trunk/mod_csr.c

Modified: mod_csr/trunk/mod_csr.c
==============================================================================
--- mod_csr/trunk/mod_csr.c	(original)
+++ mod_csr/trunk/mod_csr.c	Fri Apr 19 23:53:19 2019
@@ -214,14 +214,14 @@
                 arg1);
     }
     else {
-		const char *expr_err = NULL;
-		name->expr = ap_expr_parse_cmd(cmd, arg2, AP_EXPR_FLAG_STRING_RESULT,
-				&expr_err, NULL);
-		if (expr_err) {
-			return apr_pstrcat(cmd->temp_pool, "Cannot parse expression '",
-					arg2, "': ", expr_err, NULL);
-		}
-	}
+        const char *expr_err = NULL;
+        name->expr = ap_expr_parse_cmd(cmd, arg2, AP_EXPR_FLAG_STRING_RESULT,
+                &expr_err, NULL);
+        if (expr_err) {
+            return apr_pstrcat(cmd->temp_pool, "Cannot parse expression '",
+                    arg2, "': ", expr_err, NULL);
+        }
+    }
 
     conf->subject_set = 1;
 
@@ -317,14 +317,14 @@
                 arg1);
     }
     else {
-		const char *expr_err = NULL;
-		name->expr = ap_expr_parse_cmd(cmd, arg2, AP_EXPR_FLAG_STRING_RESULT,
-				&expr_err, NULL);
-		if (expr_err) {
-			return apr_pstrcat(cmd->temp_pool, "Cannot parse expression '",
-					arg2, "': ", expr_err, NULL);
-		}
-	}
+        const char *expr_err = NULL;
+        name->expr = ap_expr_parse_cmd(cmd, arg2, AP_EXPR_FLAG_STRING_RESULT,
+                &expr_err, NULL);
+        if (expr_err) {
+            return apr_pstrcat(cmd->temp_pool, "Cannot parse expression '",
+                    arg2, "': ", expr_err, NULL);
+        }
+    }
 
     conf->subjectaltname_set = 1;
 
@@ -357,9 +357,9 @@
                         AP_INIT_TAKE1("CsrParamPkcs10",
                                 set_csr_param_pkcs10, NULL, RSRC_CONF | ACCESS_CONF,
                                 "Set to the name of the request variable from the client containing the CSR. Defaults to " DEFAULT_CSR_PARAM_PKCS10),
-						AP_INIT_TAKE1("CsrParamChallenge",
-								set_csr_param_challenge, NULL, RSRC_CONF | ACCESS_CONF,
-								"Set to the name of the request variable from the client containing the param_challenge password. If unset, will be taken from the CSR itself."),
+                        AP_INIT_TAKE1("CsrParamChallenge",
+                                set_csr_param_challenge, NULL, RSRC_CONF | ACCESS_CONF,
+                                "Set to the name of the request variable from the client containing the param_challenge password. If unset, will be taken from the CSR itself."),
                         AP_INIT_TAKE1("CsrLocation",
                                 set_location, NULL, RSRC_CONF | ACCESS_CONF,
                                 "Set to the location of the csr service."),
@@ -543,12 +543,12 @@
             }
             if (!X509_NAME_add_entry_by_NID(subject, name->nid,
                         MBSTRING_UTF8, (unsigned char *) arg, -1, -1, 0)) {
-            	log_message(r, APR_SUCCESS,
-            			apr_psprintf(r->pool,
-            					"Expression with value '%s' could not be added to the certificate subject as '%s'.",
-								arg, name->name));
-
-            	return HTTP_INTERNAL_SERVER_ERROR;
+                log_message(r, APR_SUCCESS,
+                        apr_psprintf(r->pool,
+                                "Expression with value '%s' could not be added to the certificate subject as '%s'.",
+                                arg, name->name));
+
+                return HTTP_INTERNAL_SERVER_ERROR;
             }
         }
 
@@ -641,10 +641,10 @@
             GENERAL_NAME *gen = a2i_GENERAL_NAME(NULL, NULL, NULL, name->nid,
                     (char *) arg, 0);
             if (!gen) {
-            	log_message(r, APR_SUCCESS,
-            			apr_psprintf(r->pool,
-            					"Expression with value '%s' could not be added to the certificate subjectAltName as '%s'.",
-								arg, name->name));
+                log_message(r, APR_SUCCESS,
+                        apr_psprintf(r->pool,
+                                "Expression with value '%s' could not be added to the certificate subjectAltName as '%s'.",
+                                arg, name->name));
 
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
@@ -799,7 +799,7 @@
         ap_form_pair_t *pair = (ap_form_pair_t *) apr_array_pop(pairs);
         if (!strcmp(pair->name, conf->param_pkcs10)) {
 
-        	BIO *mem = BIO_new(BIO_s_mem());
+            BIO *mem = BIO_new(BIO_s_mem());
             apr_pool_cleanup_register(r->pool, mem, csr_BIO_cleanup,
                     apr_pool_cleanup_null);
 
@@ -837,7 +837,7 @@
         /* handle the param_challenge */
         else if (conf->param_challenge && !strcmp(pair->name, conf->param_challenge)) {
 
-        	apr_brigade_length(pair->value, 1, &offset);
+            apr_brigade_length(pair->value, 1, &offset);
             challenge_size = (apr_size_t) offset;
             challenge = apr_palloc(r->pool, challenge_size);
             apr_brigade_flatten(pair->value, (char *)challenge, &challenge_size);
@@ -1000,8 +1000,8 @@
 
         /* content type */
         ap_set_content_type(r, "application/pkcs7-mime");
-		apr_table_set(r->headers_out, "Content-Disposition",
-				"inline, filename=certificates.p7c");
+        apr_table_set(r->headers_out, "Content-Disposition",
+                "inline, filename=certificates.p7c");
         ap_set_content_length(r, len);
 
     }
@@ -1038,7 +1038,7 @@
 
 static int csr_handler(request_rec *r)
 {
-	csr_config_rec *conf = ap_get_module_config(r->per_dir_config, &csr_module);
+    csr_config_rec *conf = ap_get_module_config(r->per_dir_config, &csr_module);
 
     if (!conf) {
         return DECLINED;
@@ -1056,7 +1056,7 @@
         /* if application/x-www-form-urlencoded, try parse the form */
         ct = apr_table_get(r->headers_in, "Content-Type");
         if (ct && !strcmp("application/x-www-form-urlencoded", ct)) {
-        	return csr_form_handler(r);
+            return csr_form_handler(r);
         }
 
         return HTTP_UNSUPPORTED_MEDIA_TYPE;
@@ -1095,7 +1095,8 @@
 }
 
 module AP_MODULE_DECLARE_DATA csr_module =
-{ STANDARD20_MODULE_STUFF, create_csr_dir_config, /* dir config creater */
+{
+    STANDARD20_MODULE_STUFF, create_csr_dir_config, /* dir config creater */
     merge_csr_dir_config, /* dir merger --- default is to override */
     NULL, /* server config */
     NULL, /* merge server config */



More information about the rs-commit mailing list