Do not use deprecated features with openssl-1.1

This commit is contained in:
Mark Wright
2018-10-24 16:00:04 +02:00
committed by Lars Wendler
parent 169789b148
commit d10007a2c6
2 changed files with 9 additions and 1 deletions

View File

@@ -421,7 +421,11 @@ ssl_check_cert_ident(X509 * x, char *hostname)
for (i = 0; i < n; i++) {
gn = sk_GENERAL_NAME_value(alt, i);
if (gn->type == GEN_DNS) {
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
char *sn = ASN1_STRING_data(gn->d.ia5);
#else
char *sn = ASN1_STRING_get0_data(gn->d.ia5);
#endif
int sl = ASN1_STRING_length(gn->d.ia5);
if (!seen_dnsname)