]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: compilation issue with openssl v0.9.6.
authorEmeric Brun <ebrun@exceliance.fr>
Tue, 17 Sep 2013 13:47:48 +0000 (15:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Sep 2013 21:19:41 +0000 (23:19 +0200)
Failed to compile with openssl 0.9.6 since the 'verifyhost' feature.

src/ssl_sock.c

index 4ae27fc30487e17666e35e9d33bd80416a5b40d5..105aa1d3bb80bb84508eef706f57b8a6d5dbda59 100644 (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);
                                }