[rt-commit] r134 - in /redwax-tool/trunk: ChangeLog redwax_openssl.c

rt-commit at redwax.eu rt-commit at redwax.eu
Tue Sep 27 12:36:54 CEST 2022


Author: minfrin at redwax.eu
Date: Tue Sep 27 12:36:53 2022
New Revision: 134

Log:
Make sure when we filter no verified certificates, we
exit with a non zero code.

Modified:
    redwax-tool/trunk/ChangeLog
    redwax-tool/trunk/redwax_openssl.c

Modified: redwax-tool/trunk/ChangeLog
==============================================================================
--- redwax-tool/trunk/ChangeLog	(original)
+++ redwax-tool/trunk/ChangeLog	Tue Sep 27 12:36:53 2022
@@ -1,5 +1,8 @@
 
 Changes with v0.9.2
+
+ *) Make sure when we filter no verified certificates, we
+    exit with a non zero code. [Graham Leggett]
 
  *) Add support for reading and writing certificates and
     keys as specific users or groups. [Graham Leggett]

Modified: redwax-tool/trunk/redwax_openssl.c
==============================================================================
--- redwax-tool/trunk/redwax_openssl.c	(original)
+++ redwax-tool/trunk/redwax_openssl.c	Tue Sep 27 12:36:53 2022
@@ -1593,6 +1593,7 @@
     const void *key;
     apr_ssize_t klen;
     int i, j;
+    int found = 0;
 
     if (strcmp(arg, REDWAX_OPENSSL_VERIFY)) {
         return DECLINED;
@@ -1683,6 +1684,8 @@
 
                  redwax_certificate_t *ncert;
                  redwax_certificate_t tcert = { 0 };
+
+                 found++;
 
                  memcpy(&tcert, cert, sizeof(redwax_certificate_t));
 
@@ -1770,7 +1773,12 @@
 
     }
 
-    return APR_SUCCESS;
+    if (found) {
+        return APR_SUCCESS;
+    }
+    else {
+        return APR_ENOENT;
+    }
 }
 
 static apr_status_t redwax_openssl_process_pem_out(redwax_tool_t *r,



More information about the rt-commit mailing list