mirror of https://github.com/Icinga/icinga2.git
TlsUtility: Replace deprecated OpenSSL function with ASN1_STRING_get0_data()
This commit is contained in:
parent
456b0779bb
commit
fdb13d1b7d
|
@ -872,7 +872,13 @@ Array::Ptr GetSubjectAltNames(const std::shared_ptr<X509>& cert)
|
||||||
GENERAL_NAME* gen = sk_GENERAL_NAME_value(subjectAltNames, i);
|
GENERAL_NAME* gen = sk_GENERAL_NAME_value(subjectAltNames, i);
|
||||||
if (gen->type == GEN_URI || gen->type == GEN_DNS || gen->type == GEN_EMAIL) {
|
if (gen->type == GEN_URI || gen->type == GEN_DNS || gen->type == GEN_EMAIL) {
|
||||||
ASN1_IA5STRING *asn1_str = gen->d.uniformResourceIdentifier;
|
ASN1_IA5STRING *asn1_str = gen->d.uniformResourceIdentifier;
|
||||||
|
|
||||||
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
String san = Convert::ToString(ASN1_STRING_data(asn1_str));
|
String san = Convert::ToString(ASN1_STRING_data(asn1_str));
|
||||||
|
#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
|
||||||
|
String san = Convert::ToString(ASN1_STRING_get0_data(asn1_str));
|
||||||
|
#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
|
||||||
|
|
||||||
sans->Add(san);
|
sans->Add(san);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue