[rs-commit] r431 - /mod_timestamp/trunk/mod_timestamp.c

rs-commit at redwax.eu rs-commit at redwax.eu
Fri Jan 21 21:53:50 CET 2022


Author: dirkx at redwax.eu
Date: Fri Jan 21 21:53:49 2022
New Revision: 431

Log:
DEFINE_STACK_OF(EVP_MD) seems to have gone; recreate it. And quell a warning.

Modified:
    mod_timestamp/trunk/mod_timestamp.c

Modified: mod_timestamp/trunk/mod_timestamp.c
==============================================================================
--- mod_timestamp/trunk/mod_timestamp.c	(original)
+++ mod_timestamp/trunk/mod_timestamp.c	Fri Jan 21 21:53:49 2022
@@ -40,6 +40,14 @@
 #include "util_script.h"
 
 #include "mod_ca.h"
+
+#ifndef sk_EVP_MD_free
+/* Recent versions of OpenSSL seem to no longer define 
+ * a stack of EVP_MD's. 
+ */
+#include <openssl/safestack.h>
+DEFINE_STACK_OF(EVP_MD)
+#endif
 
 #define DEFAULT_TIMESTAMP_SIZE 128*1024
 
@@ -360,7 +368,7 @@
         return apr_psprintf(cmd->pool,
                 "'%s' could not be recognised as a valid digest.", arg);
     }
-    if (!sk_EVP_MD_push(conf->digests, digest)) {
+    if (!sk_EVP_MD_push(conf->digests, (EVP_MD *)digest)) {
         return apr_psprintf(cmd->pool,
                 "'%s' could not be added as a valid digest.", arg);
     }



More information about the rs-commit mailing list