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

rs-commit at redwax.eu rs-commit at redwax.eu
Wed Jan 8 14:51:00 CET 2020


Author: dirkx at redwax.eu
Date: Wed Jan  8 14:50:59 2020
New Revision: 257

Log:
Remove the confusing 'null' entries in the error & explain the ramfication of the default '1' count on '*' (which we propably should change and make a -1 by default).

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	Wed Jan  8 14:50:59 2020
@@ -183,8 +183,8 @@
     csr_config_rec *conf = dconf;
     name_rec *name = apr_array_push(conf->subject);
 
+    name->name = arg1;
     if (strcmp(arg1, "*")) {
-        name->name = arg1;
         name->nid = OBJ_txt2nid(arg1);
         if (name->nid == NID_undef) {
             return apr_psprintf(cmd->pool,
@@ -283,8 +283,8 @@
     csr_config_rec *conf = dconf;
     name_rec *name = apr_array_push(conf->subjectaltname);
 
+    name->name = arg1;
     if (strcmp(arg1, "*")) {
-        name->name = arg1;
         name->nid = type_from_subjectaltname(arg1);
         if (name->nid < 0) {
             return apr_psprintf(cmd->pool,
@@ -580,8 +580,9 @@
                             if (count <= 0) {
                                 log_message(r, APR_SUCCESS,
                                         apr_psprintf(r->pool,
-                                                "Subject name '%s' cannot be inserted into certificate more than %d times.",
-                                                name->name, name->limit));
+                                                "Subject name '%s' cannot be inserted into certificate more than %d times%s.",
+                                                name->name, name->limit,
+                                                name->nid ? "" : "(count is across all wildcard matches)"));
 
                                 return HTTP_BAD_REQUEST;
                             }



More information about the rs-commit mailing list