[rs-commit] r308 - /mod_cert/trunk/mod_cert.c

rs-commit at redwax.eu rs-commit at redwax.eu
Tue Feb 25 01:02:03 CET 2020


Author: minfrin at redwax.eu
Date: Tue Feb 25 01:02:02 2020
New Revision: 308

Log:
Return 404 not found if the hooks are unset.

Modified:
    mod_cert/trunk/mod_cert.c

Modified: mod_cert/trunk/mod_cert.c
==============================================================================
--- mod_cert/trunk/mod_cert.c	(original)
+++ mod_cert/trunk/mod_cert.c	Tue Feb 25 01:02:02 2020
@@ -463,10 +463,16 @@
             log_message(r, APR_SUCCESS,
                     "No module configured to return the CA certificate");
 
-            return HTTP_INTERNAL_SERVER_ERROR;
+            return HTTP_NOT_FOUND;
         }
         if (rv > OK) {
             return rv;
+        }
+        if (!len) {
+            log_message(r, APR_SUCCESS,
+                    "No CA certificate is available");
+
+            return HTTP_NOT_FOUND;
         }
 
         return get_cert(r, der, len, validity);
@@ -505,10 +511,16 @@
             log_message(r, APR_SUCCESS,
                     "No module configured to return the next CA certificate");
 
-            return HTTP_INTERNAL_SERVER_ERROR;
+            return HTTP_NOT_FOUND;
         }
         if (rv > OK) {
             return rv;
+        }
+        if (!len) {
+            log_message(r, APR_SUCCESS,
+                    "No next CA certificate is available");
+
+            return HTTP_NOT_FOUND;
         }
 
         return get_cert(r, der, len, validity);



More information about the rs-commit mailing list