summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/md/md_crypt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/md/md_crypt.c b/modules/md/md_crypt.c
index 8dfefa1176..a804c51fb6 100644
--- a/modules/md/md_crypt.c
+++ b/modules/md/md_crypt.c
@@ -1212,10 +1212,13 @@ apr_status_t md_cert_get_alt_names(apr_array_header_t **pnames, const md_cert_t
APR_ARRAY_PUSH(names, const char *) = apr_pstrdup(p, (char*)buf);
OPENSSL_free(buf);
break;
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
case GEN_IPADD:
len = ASN1_STRING_length(cval->d.iPAddress);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ip = ASN1_STRING_data(cval->d.iPAddress);
+#else
ip = ASN1_STRING_get0_data(cval->d.iPAddress);
+#endif
if (len == 4) /* IPv4 address */
APR_ARRAY_PUSH(names, const char *) = apr_psprintf(p, "%u.%u.%u.%u",
ip[0], ip[1], ip[2], ip[3]);
@@ -1232,7 +1235,6 @@ apr_status_t md_cert_get_alt_names(apr_array_header_t **pnames, const md_cert_t
; /* Unknown address type - Log? Assert? */
}
break;
-#endif
default:
break;
}