comparison configure @ 5887:6eca500211f4

Prototype for X509_check_host() has changed, detect this in configure.ac ChangeLog addition: 2015-04-09 Aidan Kehoe <kehoea@parhasard.net> * configure.ac: If X509_check_host() is available, check the number of arguments it takes. Don't use it if it takes any number of arguments other than five. Also don't use it if <openssl/x509v3.h> does not declare it, since if that is so there is no portable way to tell how many arguments it should take, and so we would end up smashing the stack. * configure: Regenerate. src/ChangeLog addition: 2015-04-09 Aidan Kehoe <kehoea@parhasard.net> * tls.c: #include <openssl/x509v3.h> for its prototype for X509_check_host(). * tls.c (tls_open): Pass the new fifth argument to X509_check_host().
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 09 Apr 2015 14:27:02 +0100
parents abe88cd200c9
children b2709239b1f6
comparison
equal deleted inserted replaced
5886:c96000075e49 5887:6eca500211f4
11795 #include <sys/types.h> 11795 #include <sys/types.h>
11796 /* Check that off_t can represent 2**63 - 1 correctly. 11796 /* Check that off_t can represent 2**63 - 1 correctly.
11797 We can't simply define LARGE_OFF_T to be 9223372036854775807, 11797 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11798 since some C++ compilers masquerading as C compilers 11798 since some C++ compilers masquerading as C compilers
11799 incorrectly reject 9223372036854775807. */ 11799 incorrectly reject 9223372036854775807. */
11800 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 11800 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11801 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 11801 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11802 && LARGE_OFF_T % 2147483647 == 1) 11802 && LARGE_OFF_T % 2147483647 == 1)
11803 ? 1 : -1]; 11803 ? 1 : -1];
11804 int 11804 int
11805 main () 11805 main ()
11841 #include <sys/types.h> 11841 #include <sys/types.h>
11842 /* Check that off_t can represent 2**63 - 1 correctly. 11842 /* Check that off_t can represent 2**63 - 1 correctly.
11843 We can't simply define LARGE_OFF_T to be 9223372036854775807, 11843 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11844 since some C++ compilers masquerading as C compilers 11844 since some C++ compilers masquerading as C compilers
11845 incorrectly reject 9223372036854775807. */ 11845 incorrectly reject 9223372036854775807. */
11846 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 11846 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11847 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 11847 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11848 && LARGE_OFF_T % 2147483647 == 1) 11848 && LARGE_OFF_T % 2147483647 == 1)
11849 ? 1 : -1]; 11849 ? 1 : -1];
11850 int 11850 int
11851 main () 11851 main ()
11865 #include <sys/types.h> 11865 #include <sys/types.h>
11866 /* Check that off_t can represent 2**63 - 1 correctly. 11866 /* Check that off_t can represent 2**63 - 1 correctly.
11867 We can't simply define LARGE_OFF_T to be 9223372036854775807, 11867 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11868 since some C++ compilers masquerading as C compilers 11868 since some C++ compilers masquerading as C compilers
11869 incorrectly reject 9223372036854775807. */ 11869 incorrectly reject 9223372036854775807. */
11870 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 11870 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11871 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 11871 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11872 && LARGE_OFF_T % 2147483647 == 1) 11872 && LARGE_OFF_T % 2147483647 == 1)
11873 ? 1 : -1]; 11873 ? 1 : -1];
11874 int 11874 int
11875 main () 11875 main ()
11910 #include <sys/types.h> 11910 #include <sys/types.h>
11911 /* Check that off_t can represent 2**63 - 1 correctly. 11911 /* Check that off_t can represent 2**63 - 1 correctly.
11912 We can't simply define LARGE_OFF_T to be 9223372036854775807, 11912 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11913 since some C++ compilers masquerading as C compilers 11913 since some C++ compilers masquerading as C compilers
11914 incorrectly reject 9223372036854775807. */ 11914 incorrectly reject 9223372036854775807. */
11915 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 11915 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11916 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 11916 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11917 && LARGE_OFF_T % 2147483647 == 1) 11917 && LARGE_OFF_T % 2147483647 == 1)
11918 ? 1 : -1]; 11918 ? 1 : -1];
11919 int 11919 int
11920 main () 11920 main ()
11934 #include <sys/types.h> 11934 #include <sys/types.h>
11935 /* Check that off_t can represent 2**63 - 1 correctly. 11935 /* Check that off_t can represent 2**63 - 1 correctly.
11936 We can't simply define LARGE_OFF_T to be 9223372036854775807, 11936 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11937 since some C++ compilers masquerading as C compilers 11937 since some C++ compilers masquerading as C compilers
11938 incorrectly reject 9223372036854775807. */ 11938 incorrectly reject 9223372036854775807. */
11939 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) 11939 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11940 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 11940 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11941 && LARGE_OFF_T % 2147483647 == 1) 11941 && LARGE_OFF_T % 2147483647 == 1)
11942 ? 1 : -1]; 11942 ? 1 : -1];
11943 int 11943 int
11944 main () 11944 main ()
21415 fi 21415 fi
21416 openssl_libs=`pkg-config --libs openssl` 21416 openssl_libs=`pkg-config --libs openssl`
21417 if test "$?" = 0; then 21417 if test "$?" = 0; then
21418 LIBS="$LIBS "$openssl_libs"" && if test "$verbose" = "yes"; then echo " Appending \""$openssl_libs"\" to \$LIBS"; fi 21418 LIBS="$LIBS "$openssl_libs"" && if test "$verbose" = "yes"; then echo " Appending \""$openssl_libs"\" to \$LIBS"; fi
21419 fi 21419 fi
21420 ac_fn_c_check_func "$LINENO" "X509_check_host" "ac_cv_func_X509_check_host" 21420 ac_fn_c_check_func "$LINENO" "X509_check_host" "ac_cv_func_X509_check_host"
21421 if test "x$ac_cv_func_X509_check_host" = xyes; then : 21421 if test "x$ac_cv_func_X509_check_host" = xyes; then :
21422 $as_echo "#define HAVE_X509_CHECK_HOST 1" >>confdefs.h 21422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21423 21423 /* end confdefs.h. */
21424 #include <openssl/x509v3.h>
21425 int
21426 main ()
21427 {
21428 return X509_check_host ((void *) 0,
21429 (const char *) 0, 0, 0,
21430 (void *) 0);
21431 ;
21432 return 0;
21433 }
21434 _ACEOF
21435 if ac_fn_c_try_compile "$LINENO"; then :
21436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that X509_check_host is declared" >&5
21437 $as_echo_n "checking that X509_check_host is declared... " >&6; }
21438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21439 /* end confdefs.h. */
21440 #include <openssl/x509v3.h>
21441 int
21442 main ()
21443 {
21444 return X509_check_host (-1);
21445 ;
21446 return 0;
21447 }
21448 _ACEOF
21449 if ac_fn_c_try_compile "$LINENO"; then :
21450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21451 $as_echo "no" >&6; }
21452 else
21453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21454 $as_echo "yes" >&6; }
21455 $as_echo "#define HAVE_X509_CHECK_HOST 1" >>confdefs.h
21456
21457 fi
21458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21459 fi
21460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21424 fi 21461 fi
21425 21462
21426 else 21463 else
21427 with_tls=no 21464 with_tls=no
21428 fi 21465 fi