summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openssl.c b/openssl.c
index 84ab4de..0b64382 100644
--- a/openssl.c
+++ b/openssl.c
@@ -199,7 +199,7 @@ static BOOL spc_verify_cert_hostname(X509 *cert, const char *hostname)
continue;
// Current name is a DNS name, let's check it
- char *dns_name = (char*)ASN1_STRING_data(current_name->d.dNSName);
+ const char *dns_name = (const char*)ASN1_STRING_get0_data(current_name->d.dNSName);
// Make sure there isn't an embedded null character in the DNS name
if ((size_t) ASN1_STRING_length(current_name->d.dNSName) != strlen(dns_name))
break;