BUILD: ssl: compilation issue with openssl v0.9.6.

Failed to compile with openssl 0.9.6 since the 'verifyhost' feature.
This commit is contained in:
Emeric Brun 2013-09-17 15:47:48 +02:00 committed by Willy Tarreau
parent 4ad50a469d
commit a33410cf94

View File

@ -855,7 +855,11 @@ static int ssl_sock_srv_verifycbk(int ok, X509_STORE_CTX *ctx)
for (i = 0; !ok && i < sk_GENERAL_NAME_num(alt_names); i++) {
GENERAL_NAME *name = sk_GENERAL_NAME_value(alt_names, i);
if (name->type == GEN_DNS) {
#if OPENSSL_VERSION_NUMBER < 0x00907000L
if (ASN1_STRING_to_UTF8((unsigned char **)&str, name->d.ia5) >= 0) {
#else
if (ASN1_STRING_to_UTF8((unsigned char **)&str, name->d.dNSName) >= 0) {
#endif
ok = ssl_sock_srv_hostcheck(str, servername);
OPENSSL_free(str);
}