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

rs-commit at redwax.eu rs-commit at redwax.eu
Tue Dec 3 22:22:51 CET 2019


Author: dirkx at redwax.eu
Date: Tue Dec  3 22:22:50 2019
New Revision: 148

Log:
Minor tweak to compile against 1.1.0-1.1.1

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	Tue Dec  3 22:22:50 2019
@@ -713,7 +713,7 @@
     if (conf->digests) {
         int i;
         for (i = 0; i < sk_EVP_MD_num(conf->digests); i++) {
-            EVP_MD *digest = sk_EVP_MD_value(conf->digests, i);
+            const EVP_MD *digest = sk_EVP_MD_value(conf->digests, i);
             if (digest) {
                 if (!TS_RESP_CTX_add_md(ctx, digest)) {
                     log_message(r, APR_SUCCESS,
@@ -762,7 +762,13 @@
 
     /* sanity check - any errors during the generation process? */
     si = TS_RESP_get_status_info(resp);
-    if (ASN1_INTEGER_get(si->status) != TS_STATUS_GRANTED) {
+// Introduced around 1.1.0a
+#if OPENSSL_VERSION_NUMBER  > 0x1010000fL
+    const ASN1_INTEGER * sisp = TS_STATUS_INFO_get0_status(si);
+#else
+    ASN1_INTEGER * sisp = si->status;
+#endif
+    if (ASN1_INTEGER_get(sisp) != TS_STATUS_GRANTED) {
         log_message(r, APR_SUCCESS, "Timestamp not granted");
     }
 



More information about the rs-commit mailing list