diff -Nru erlang-p1-tls-0.2015.02.04/configure erlang-p1-tls-1.0.0/configure --- erlang-p1-tls-0.2015.02.04/configure 2015-04-04 14:02:48.000000000 +0000 +++ erlang-p1-tls-1.0.0/configure 2016-01-05 11:20:15.000000000 +0000 @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for tls 0.2.0. +# Generated by GNU Autoconf 2.69 for tls 0.2.0. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -89,6 +87,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -133,6 +132,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -166,7 +190,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -211,14 +236,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -320,6 +356,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -441,6 +485,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -475,16 +523,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -496,28 +544,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1064,7 +1092,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1115,8 +1143,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1347,9 +1373,9 @@ if $ac_init_version; then cat <<\_ACEOF tls configure 0.2.0 -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1393,7 +1419,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1430,7 +1456,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1472,7 +1498,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1485,10 +1511,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1551,7 +1577,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1560,7 +1586,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1573,7 +1599,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1591,7 +1617,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1622,7 +1648,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1636,7 +1662,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1645,7 +1671,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by tls $as_me 0.2.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1903,7 +1929,7 @@ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2004,7 +2030,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2016,7 +2042,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2044,7 +2070,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2056,7 +2082,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2097,7 +2123,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2109,7 +2135,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2137,7 +2163,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2150,7 +2176,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2196,7 +2222,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2208,7 +2234,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2240,7 +2266,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2252,7 +2278,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2295,7 +2321,7 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2410,7 +2436,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -2453,7 +2479,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -2512,7 +2538,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -2523,7 +2549,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2564,7 +2590,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -2574,7 +2600,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2611,7 +2637,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -2689,7 +2715,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -2698,8 +2724,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -2788,7 +2813,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2824,7 +2849,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2833,11 +2858,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -2854,8 +2879,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -2871,10 +2897,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -2916,7 +2942,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3032,7 +3058,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3044,7 +3070,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3058,7 +3084,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3107,7 +3133,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3124,7 +3150,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3174,7 +3200,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3304,7 +3330,7 @@ for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : +if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF @@ -3315,7 +3341,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : +if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -3370,7 +3396,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3493,7 +3519,7 @@ set dummy ${ac_tool_prefix}erl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ERL+set}" = set; then : +if ${ac_cv_path_ERL+:} false; then : $as_echo_n "(cached) " >&6 else case $ERL in @@ -3507,7 +3533,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3536,7 +3562,7 @@ set dummy erl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_ERL+set}" = set; then : +if ${ac_cv_path_ac_pt_ERL+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_ERL in @@ -3550,7 +3576,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_ERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3602,7 +3628,7 @@ set dummy ${ac_tool_prefix}erlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ERLC+set}" = set; then : +if ${ac_cv_path_ERLC+:} false; then : $as_echo_n "(cached) " >&6 else case $ERLC in @@ -3616,7 +3642,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ERLC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3645,7 +3671,7 @@ set dummy erlc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_ERLC+set}" = set; then : +if ${ac_cv_path_ac_pt_ERLC+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_ERLC in @@ -3659,7 +3685,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_ERLC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3708,7 +3734,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_free in -lssl" >&5 $as_echo_n "checking for SSL_free in -lssl... " >&6; } -if test "${ac_cv_lib_ssl_SSL_free+set}" = set; then : +if ${ac_cv_lib_ssl_SSL_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3742,13 +3768,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_free" >&5 $as_echo "$ac_cv_lib_ssl_SSL_free" >&6; } -if test "x$ac_cv_lib_ssl_SSL_free" = x""yes; then : +if test "x$ac_cv_lib_ssl_SSL_free" = xyes; then : SSL_LIB=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5 $as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; } -if test "${ac_cv_lib_crypto_SHA1_Init+set}" = set; then : +if ${ac_cv_lib_crypto_SHA1_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3782,24 +3808,24 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5 $as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; } -if test "x$ac_cv_lib_crypto_SHA1_Init" = x""yes; then : +if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes; then : CRYPTO_LIB=yes fi ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then : +if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : SSL_HEADER=yes fi ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_err_h" = x""yes; then : +if test "x$ac_cv_header_openssl_err_h" = xyes; then : ERR_HEADER=yes fi ac_fn_c_check_header_mongrel "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_sha_h" = x""yes; then : +if test "x$ac_cv_header_openssl_sha_h" = xyes; then : SHA_HEADER=yes fi @@ -3824,6 +3850,7 @@ if test "x$SHA_HEADER" = "x"; then as_fn_error $? "OpenSSL header file \"openssl/sha.h\" was not found" "$LINENO" 5 fi +ac_config_files="$ac_config_files vars.config" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -3889,10 +3916,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -3960,7 +3998,7 @@ -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -4061,6 +4099,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4256,16 +4295,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -4325,28 +4364,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -4368,7 +4395,7 @@ # values after options handling. ac_log=" This file was extended by tls $as_me 0.2.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -4381,11 +4408,15 @@ _ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. +config_files="$ac_config_files" _ACEOF @@ -4404,6 +4435,11 @@ do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files Report bugs to the package provider." @@ -4412,10 +4448,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ tls config.status 0.2.0 -configured by $0, generated by GNU Autoconf 2.67, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -4457,6 +4493,14 @@ $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -4484,7 +4528,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -4513,12 +4557,423 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in + "vars.config") CONFIG_FILES="$CONFIG_FILES vars.config" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + + esac + +done # for ac_tag + + as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save diff -Nru erlang-p1-tls-0.2015.02.04/configure.ac erlang-p1-tls-1.0.0/configure.ac --- erlang-p1-tls-0.2015.02.04/configure.ac 2015-04-04 14:02:48.000000000 +0000 +++ erlang-p1-tls-1.0.0/configure.ac 2016-01-05 11:20:15.000000000 +0000 @@ -53,5 +53,5 @@ if test "x$SHA_HEADER" = "x"; then AC_MSG_ERROR([OpenSSL header file "openssl/sha.h" was not found]) fi - +AC_CONFIG_FILES([vars.config]) AC_OUTPUT diff -Nru erlang-p1-tls-0.2015.02.04/c_src/p1_tls_drv.c erlang-p1-tls-1.0.0/c_src/p1_tls_drv.c --- erlang-p1-tls-0.2015.02.04/c_src/p1_tls_drv.c 2015-04-04 14:02:48.000000000 +0000 +++ erlang-p1-tls-1.0.0/c_src/p1_tls_drv.c 2016-01-05 11:20:15.000000000 +0000 @@ -36,6 +36,12 @@ BIO *bio_write; SSL *ssl; int handshakes; + char *send_buffer; + int send_buffer_size; + int send_buffer_len; + char *send_buffer2; + int send_buffer2_size; + int send_buffer2_len; } tls_data; static int ssl_index; @@ -104,7 +110,8 @@ struct bucket { uint32_t hash; char *key; - time_t mtime; + time_t key_mtime; + time_t dh_mtime; SSL_CTX *ssl_ctx; struct bucket *next; }; @@ -130,7 +137,8 @@ } -static void hash_table_insert(char *key, time_t mtime, SSL_CTX *ssl_ctx) +static void hash_table_insert(char *key, time_t key_mtime, time_t dh_mtime, + SSL_CTX *ssl_ctx) { int level, split; uint32_t hash = str_hash(key); @@ -149,7 +157,8 @@ el = ht.buckets[bucket]; while (el != NULL) { if (el->hash == hash && strcmp(el->key, key) == 0) { - el->mtime = mtime; + el->key_mtime = key_mtime; + el->dh_mtime = dh_mtime; if (el->ssl_ctx != NULL) SSL_CTX_free(el->ssl_ctx); el->ssl_ctx = ssl_ctx; @@ -166,7 +175,8 @@ new_bucket_el->hash = hash; new_bucket_el->key = (char *)driver_alloc(strlen(key) + 1); strcpy(new_bucket_el->key, key); - new_bucket_el->mtime = mtime; + new_bucket_el->key_mtime = key_mtime; + new_bucket_el->dh_mtime = dh_mtime; new_bucket_el->ssl_ctx = ssl_ctx; new_bucket_el->next = ht.buckets[bucket]; ht.buckets[bucket] = new_bucket_el; @@ -203,7 +213,8 @@ } } -static SSL_CTX *hash_table_lookup(char *key, time_t *pmtime) +static SSL_CTX *hash_table_lookup(char *key, time_t *key_mtime, + time_t *dh_mtime) { int level, split; uint32_t hash = str_hash(key); @@ -220,7 +231,8 @@ el = ht.buckets[bucket]; while (el != NULL) { if (el->hash == hash && strcmp(el->key, key) == 0) { - *pmtime = el->mtime; + *key_mtime = el->key_mtime; + *dh_mtime = el->dh_mtime; return el->ssl_ctx; } el = el->next; @@ -238,6 +250,12 @@ d->bio_write = NULL; d->ssl = NULL; d->handshakes = 0; + d->send_buffer = NULL; + d->send_buffer_len = 0; + d->send_buffer_size = 0; + d->send_buffer2 = NULL; + d->send_buffer2_len = 0; + d->send_buffer2_size = 0; set_port_control_flags(port, PORT_CONTROL_FLAG_BINARY); @@ -250,6 +268,10 @@ if (d->ssl != NULL) SSL_free(d->ssl); + if (d->send_buffer != NULL) + driver_free(d->send_buffer); + if (d->send_buffer2 != NULL) + driver_free(d->send_buffer2); driver_free((char *)handle); } @@ -274,18 +296,19 @@ driver_free(ht.buckets); } -static int is_key_file_modified(char *file, time_t *key_file_mtime) +static int is_modified(char *file, time_t *known_mtime) { struct stat file_stat; - if (stat(file, &file_stat)) - { - *key_file_mtime = 0; + if (file == NULL) { + return 0; + } else if (stat(file, &file_stat)) { + *known_mtime = 0; return 1; } else { - if (*key_file_mtime != file_stat.st_mtime) + if (*known_mtime != file_stat.st_mtime) { - *key_file_mtime = file_stat.st_mtime; + *known_mtime = file_stat.st_mtime; return 1; } else return 0; @@ -358,26 +381,41 @@ 0x85,0x5E,0x6E,0xEB,0x22,0xB3,0xB2,0xE5, }; -static void setup_dh(SSL_CTX *ctx) +static int setup_dh(SSL_CTX *ctx, char *dh_file) { DH *dh; + int res; - dh = DH_new(); - if (dh == NULL) { - return; - } + if (dh_file != NULL) { + BIO *bio = BIO_new_file(dh_file, "r"); - dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL); - dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL); - if (dh->p == NULL || dh->g == NULL) { - DH_free(dh); - return; + if (bio == NULL) { + return 0; + } + dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); + BIO_free(bio); + if (dh == NULL) { + return 0; + } + } else { + dh = DH_new(); + if (dh == NULL) { + return 0; + } + + dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL); + dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL); + if (dh->p == NULL || dh->g == NULL) { + DH_free(dh); + return 0; + } } SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE); - SSL_CTX_set_tmp_dh(ctx, dh); + res = (int)SSL_CTX_set_tmp_dh(ctx, dh); DH_free(dh); + return res; } #endif @@ -432,6 +470,43 @@ return rlen; \ } +#ifdef _WIN32 +/** public domain strtok_r() by Charlie Gordon + ** from http://groups.google.com/group/comp.lang.c/msg/2ab1ecbb86646684 + */ +char* strtok_r( + char *str, + const char *delim, + char **nextp) +{ + char *ret; + + if (str == NULL) + { + str = *nextp; + } + + str += strspn(str, delim); + + if (*str == '\0') + { + return NULL; + } + + ret = str; + + str += strcspn(str, delim); + + if (*str) + { + *str++ = '\0'; + } + + *nextp = str; + + return ret; +} +#endif static ErlDrvSSizeT tls_drv_control(ErlDrvData handle, unsigned int command, @@ -452,15 +527,23 @@ { case SET_CERTIFICATE_FILE_ACCEPT: case SET_CERTIFICATE_FILE_CONNECT: { - time_t mtime = 0; - size_t buf_len = strlen(buf); - char *ciphers = buf + buf_len + 1; + time_t key_mtime = 0; + time_t dh_mtime = 0; + char *key_file = buf; + size_t key_file_len = strlen(key_file); + char *ciphers = key_file + key_file_len + 1; size_t ciphers_len = strlen(ciphers); char *protocol_options = ciphers + ciphers_len + 1; - char *hash_key = (char *)driver_alloc(buf_len + ciphers_len + 1); + size_t protocol_options_len = strlen(protocol_options); + char *dh_file = protocol_options + protocol_options_len + 1; + size_t dh_file_len = strlen(dh_file); + char *hash_key = (char *)driver_alloc(key_file_len + + ciphers_len + + protocol_options_len + + dh_file_len + 1); long options = 0L; - if (strlen(protocol_options) != 0) { + if (protocol_options_len != 0) { char *po = strdup(protocol_options), delim[] = "|"; char *popts = po; char *strtok_buf; @@ -473,22 +556,28 @@ free(popts); } - sprintf(hash_key, "%s%s", buf, ciphers); - SSL_CTX *ssl_ctx = hash_table_lookup(hash_key, &mtime); - - if (is_key_file_modified(buf, &mtime) || ssl_ctx == NULL) + sprintf(hash_key, "%s%s%s%s", key_file, ciphers, protocol_options, + dh_file); + SSL_CTX *ssl_ctx = hash_table_lookup(hash_key, &key_mtime, &dh_mtime); + + if (dh_file_len == 0) + dh_file = NULL; + + if (is_modified(key_file, &key_mtime) || + is_modified(dh_file, &dh_mtime) || + ssl_ctx == NULL) { SSL_CTX *ctx; - hash_table_insert(hash_key, mtime, NULL); + hash_table_insert(hash_key, key_mtime, dh_mtime, NULL); ctx = SSL_CTX_new(SSLv23_method()); die_unless(ctx, "SSL_CTX_new failed"); - res = SSL_CTX_use_certificate_chain_file(ctx, buf); + res = SSL_CTX_use_certificate_chain_file(ctx, key_file); die_unless(res > 0, "SSL_CTX_use_certificate_file failed"); - res = SSL_CTX_use_PrivateKey_file(ctx, buf, SSL_FILETYPE_PEM); + res = SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM); die_unless(res > 0, "SSL_CTX_use_PrivateKey_file failed"); res = SSL_CTX_check_private_key(ctx); @@ -502,7 +591,8 @@ setup_ecdh(ctx); #endif #ifndef OPENSSL_NO_DH - setup_dh(ctx); + res = setup_dh(ctx, dh_file); + die_unless(res > 0, "Setting DH parameters failed"); #endif SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); @@ -524,7 +614,7 @@ SSL_CTX_set_info_callback(ctx, &ssl_info_callback); ssl_ctx = ctx; - hash_table_insert(hash_key, mtime, ssl_ctx); + hash_table_insert(hash_key, key_mtime, dh_mtime, ssl_ctx); } driver_free(hash_key); @@ -569,18 +659,41 @@ case SET_DECRYPTED_OUTPUT: die_unless(d->ssl, "SSL not initialized"); - res = SSL_write(d->ssl, buf, len); - if (res <= 0) - { - res = SSL_get_error(d->ssl, res); - if (res == SSL_ERROR_WANT_READ || res == SSL_ERROR_WANT_WRITE) - { - b = driver_alloc_binary(1); - b->orig_bytes[0] = 2; - *rbuf = (char *)b; - return 1; + if (len > 0) { + if (d->send_buffer != NULL) { + if (d->send_buffer2 == NULL) { + d->send_buffer2_len = len; + d->send_buffer2_size = len; + d->send_buffer2 = driver_alloc(d->send_buffer2_size); + memcpy(d->send_buffer2, buf, len); + } else { + if (d->send_buffer2_size < + d->send_buffer2_len + len) { + while (d->send_buffer2_size < + d->send_buffer2_len + len) { + d->send_buffer2_size *= 2; + } + d->send_buffer2 = driver_realloc(d->send_buffer2, + d->send_buffer2_size); + } + memcpy(d->send_buffer2 + d->send_buffer2_len, + buf, len); + d->send_buffer2_len += len; + } } else { - die_unless(0, "SSL_write failed"); + res = SSL_write(d->ssl, buf, len); + if (res <= 0) { + res = SSL_get_error(d->ssl, res); + if (res == SSL_ERROR_WANT_READ || + res == SSL_ERROR_WANT_WRITE) { + d->send_buffer_len = len; + d->send_buffer_size = len; + d->send_buffer = driver_alloc(d->send_buffer_size); + memcpy(d->send_buffer, buf, len); + } else { + die_unless(0, "SSL_write failed"); + } + } } } break; @@ -592,9 +705,11 @@ BIO_read(d->bio_write, b->orig_bytes + 1, size - 1); *rbuf = (char *)b; return size; - case GET_DECRYPTED_INPUT: + case GET_DECRYPTED_INPUT: { + int retcode = 0; if (!SSL_is_init_finished(d->ssl)) { + retcode = 2; res = SSL_do_handshake(d->ssl); if (res <= 0) die_unless(SSL_get_error(d->ssl, res) == SSL_ERROR_WANT_READ, @@ -602,6 +717,23 @@ } if (SSL_is_init_finished(d->ssl)) { size_t req_size = 0; + int i; + for (i = 0; i < 2; i++) + if (d->send_buffer != NULL) { + res = SSL_write(d->ssl, d->send_buffer, d->send_buffer_len); + if (res <= 0) { + die_unless(0, "SSL_write failed"); + } + retcode = 2; + driver_free(d->send_buffer); + d->send_buffer = d->send_buffer2; + d->send_buffer_len = d->send_buffer2_len; + d->send_buffer_size = d->send_buffer2_size; + d->send_buffer2 = NULL; + d->send_buffer2_len = 0; + d->send_buffer2_size = 0; + } + if (len == 4) { unsigned char *b = (unsigned char *)buf; @@ -611,7 +743,7 @@ size = BUF_SIZE + 1; rlen = 1; b = driver_alloc_binary(size); - b->orig_bytes[0] = 0; + b->orig_bytes[0] = retcode; res = 0; @@ -654,8 +786,14 @@ b = driver_realloc_binary(b, rlen); *rbuf = (char *)b; return rlen; + } else { + b = driver_alloc_binary(1); + b->orig_bytes[0] = 2; + *rbuf = (char *)b; + return 1; } break; + } case GET_PEER_CERTIFICATE: cert = SSL_get_peer_certificate(d->ssl); if (cert == NULL) diff -Nru erlang-p1-tls-0.2015.02.04/debian/changelog erlang-p1-tls-1.0.0/debian/changelog --- erlang-p1-tls-0.2015.02.04/debian/changelog 2016-03-12 06:39:28.000000000 +0000 +++ erlang-p1-tls-1.0.0/debian/changelog 2016-03-18 01:23:53.000000000 +0000 @@ -1,8 +1,23 @@ -erlang-p1-tls (0.2015.02.04-1~14.04.0) trusty; urgency=medium +erlang-p1-tls (1.0.0-1~14.04.0) trusty; urgency=medium * backport to trusty - -- Richard Hansen Sun, 06 Mar 2016 05:39:22 -0500 + -- Richard Hansen Thu, 17 Mar 2016 21:23:38 -0400 + +erlang-p1-tls (1.0.0-1) unstable; urgency=medium + + * Imported Upstream version 1.0.0 + * Updated debian/copyright + * Updated debian/watch + + -- Philipp Huebner Sat, 16 Jan 2016 11:52:44 +0100 + +erlang-p1-tls (0.2015.08.03-1) unstable; urgency=medium + + * Imported Upstream version 0.2015.08.03 + * Enabled eunit + + -- Philipp Huebner Mon, 17 Aug 2015 17:43:15 +0200 erlang-p1-tls (0.2015.02.04-1) unstable; urgency=medium diff -Nru erlang-p1-tls-0.2015.02.04/debian/control erlang-p1-tls-1.0.0/debian/control --- erlang-p1-tls-0.2015.02.04/debian/control 2016-03-12 06:39:28.000000000 +0000 +++ erlang-p1-tls-1.0.0/debian/control 2016-01-16 12:23:55.000000000 +0000 @@ -1,7 +1,7 @@ Source: erlang-p1-tls Priority: optional Maintainer: Philipp Huebner -Build-Depends: debhelper (>= 9), dh-rebar, erlang-syntax-tools, libssl-dev +Build-Depends: debhelper (>= 9), dh-rebar, erlang-eunit, erlang-syntax-tools, libssl-dev Standards-Version: 3.9.6 Section: libs Homepage: https://github.com/processone/tls diff -Nru erlang-p1-tls-0.2015.02.04/debian/copyright erlang-p1-tls-1.0.0/debian/copyright --- erlang-p1-tls-0.2015.02.04/debian/copyright 2016-03-12 06:39:28.000000000 +0000 +++ erlang-p1-tls-1.0.0/debian/copyright 2016-01-16 12:23:56.000000000 +0000 @@ -3,9 +3,9 @@ Source: https://github.com/processone/tls Files: * -Copyright: 2002-2015 ProcessOne - 2002-2015 Alexey Shchepin - 2013-2015 Evgeniy Khramtsov +Copyright: 2002-2016 ProcessOne + 2002-2016 Alexey Shchepin + 2013-2016 Evgeniy Khramtsov License: GPL-2+ Files: c_src/stdint.h @@ -42,7 +42,7 @@ gives unlimited permission to copy, distribute and modify it. Files: debian/* -Copyright: 2014-2015 Philipp Huebner +Copyright: 2014-2016 Philipp Huebner License: GPL-2+ License: GPL-2+ diff -Nru erlang-p1-tls-0.2015.02.04/debian/dh-rebar.conf erlang-p1-tls-1.0.0/debian/dh-rebar.conf --- erlang-p1-tls-0.2015.02.04/debian/dh-rebar.conf 2016-03-12 06:39:28.000000000 +0000 +++ erlang-p1-tls-1.0.0/debian/dh-rebar.conf 2016-01-16 12:23:55.000000000 +0000 @@ -1 +1 @@ -EXEC_REBAR_COMMANDS=compile +EXEC_REBAR_COMMANDS=compile eunit diff -Nru erlang-p1-tls-0.2015.02.04/debian/watch erlang-p1-tls-1.0.0/debian/watch --- erlang-p1-tls-0.2015.02.04/debian/watch 2016-03-12 06:39:28.000000000 +0000 +++ erlang-p1-tls-1.0.0/debian/watch 2016-01-16 12:23:56.000000000 +0000 @@ -1 +1,3 @@ -# There are no upstream releases yet to be tracked +version=3 +opts="filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/erlang-p1-tls_$1.tar.gz/" \ + https://github.com/processone/tls/tags (?:.*/)?v?(\d[\d\.]*)\.tar\.gz diff -Nru erlang-p1-tls-0.2015.02.04/README.md erlang-p1-tls-1.0.0/README.md --- erlang-p1-tls-0.2015.02.04/README.md 1970-01-01 00:00:00.000000000 +0000 +++ erlang-p1-tls-1.0.0/README.md 2016-01-05 11:20:15.000000000 +0000 @@ -0,0 +1,3 @@ +# tls + +TLS / SSL native driver for Erlang diff -Nru erlang-p1-tls-0.2015.02.04/rebar.config erlang-p1-tls-1.0.0/rebar.config --- erlang-p1-tls-0.2015.02.04/rebar.config 2015-04-04 14:02:48.000000000 +0000 +++ erlang-p1-tls-1.0.0/rebar.config 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -{erl_opts, [debug_info]}. - -{port_env, [{"CFLAGS", "$CFLAGS -O2 -Wall"}, - {"LDFLAGS", "$LDFLAGS -lssl -lcrypto"}]}. - -{port_specs, [{"priv/lib/p1_tls_drv.so", ["c_src/p1_tls_drv.c"]}, - {"priv/lib/p1_sha.so", ["c_src/p1_sha.c"]}]}. - -%% Local Variables: -%% mode: erlang -%% End: -%% vim: set filetype=erlang tabstop=8: diff -Nru erlang-p1-tls-0.2015.02.04/rebar.config.script erlang-p1-tls-1.0.0/rebar.config.script --- erlang-p1-tls-0.2015.02.04/rebar.config.script 1970-01-01 00:00:00.000000000 +0000 +++ erlang-p1-tls-1.0.0/rebar.config.script 2016-01-05 11:20:15.000000000 +0000 @@ -0,0 +1,21 @@ +{require_min_otp_vsn, "16"}. + +Cfg = case file:consult("vars.config") of + {ok, Terms} -> + Terms; + _Err -> + [] + end ++ [{cflags, ""}, {ldflags, ""}], +{cflags, CfgCFlags} = lists:keyfind(cflags, 1, Cfg), +{ldflags, CfgLDFlags} = lists:keyfind(ldflags, 1, Cfg), + +[{erl_opts, [debug_info]}, + {port_env, [{"CFLAGS", "$CFLAGS " ++ CfgCFlags ++ " -O2 -Wall"}, + {"LDFLAGS", "$LDFLAGS " ++ CfgLDFlags ++ " -lssl -lcrypto"}]}, + {port_specs, [{"priv/lib/p1_tls_drv.so", ["c_src/p1_tls_drv.c"]}, + {"priv/lib/p1_sha.so", ["c_src/p1_sha.c"]}]}]. + +%% Local Variables: +%% mode: erlang +%% End: +%% vim: set filetype=erlang tabstop=8: diff -Nru erlang-p1-tls-0.2015.02.04/src/p1_tls_app.erl erlang-p1-tls-1.0.0/src/p1_tls_app.erl --- erlang-p1-tls-0.2015.02.04/src/p1_tls_app.erl 2015-04-04 14:02:48.000000000 +0000 +++ erlang-p1-tls-1.0.0/src/p1_tls_app.erl 2016-01-05 11:20:15.000000000 +0000 @@ -52,27 +52,10 @@ %% @end %%-------------------------------------------------------------------- start(_StartType, _StartArgs) -> - Res = case application:start(crypto) of - ok -> ok; - {error, {already_started, _}} -> ok; - Err -> Err - end, - case Res of - ok -> - case p1_sha:load_nif() of - ok -> - case p1_tls_sup:start_link() of - {ok, Pid} -> - {ok, Pid}; - Error -> - Error - end; - Error -> - Error - end; - Error -> - Error - end. + ok = application:ensure_started(crypto), + ok = p1_sha:load_nif(), + p1_tls_sup:start_link(). + %%-------------------------------------------------------------------- %% @private diff -Nru erlang-p1-tls-0.2015.02.04/src/p1_tls.app.src erlang-p1-tls-1.0.0/src/p1_tls.app.src --- erlang-p1-tls-0.2015.02.04/src/p1_tls.app.src 2015-04-04 14:02:48.000000000 +0000 +++ erlang-p1-tls-1.0.0/src/p1_tls.app.src 2016-01-05 11:20:15.000000000 +0000 @@ -8,7 +8,7 @@ %%%------------------------------------------------------------------- {application, p1_tls, [{description, "OpenSSL wrapper"}, - {vsn, "0.2.0"}, + {vsn, "1.0.0"}, {modules, []}, {registered, []}, {applications, [kernel, stdlib]}, diff -Nru erlang-p1-tls-0.2015.02.04/src/p1_tls.erl erlang-p1-tls-1.0.0/src/p1_tls.erl --- erlang-p1-tls-0.2015.02.04/src/p1_tls.erl 2015-04-04 14:02:48.000000000 +0000 +++ erlang-p1-tls-1.0.0/src/p1_tls.erl 2016-01-05 11:20:15.000000000 +0000 @@ -139,10 +139,17 @@ false -> <<>> end, + DHFile = case lists:keysearch(dhfile, 1, Options) of + {value, {dhfile, D}} -> + iolist_to_binary(D); + false -> + <<>> + end, CertFile1 = iolist_to_binary(CertFile), case catch port_control(Port, Command bor Flags, <>) + 0, ProtocolOpts/binary, 0, DHFile/binary, + 0>>) of {'EXIT', {badarg, _}} -> {error, einval}; <<0>> -> @@ -165,20 +172,16 @@ {error, binary()} | {ok, binary()}. -recv(#tlssock{tcpsock = TCPSocket, tlsport = Port} = +recv(#tlssock{tcpsock = TCPSocket} = TLSSock, Length, Timeout) -> - case catch port_control(Port, ?GET_DECRYPTED_INPUT, - <>) - of - {'EXIT', {badarg, _}} -> {error, einval}; - <<0>> -> - case gen_tcp:recv(TCPSocket, 0, Timeout) of - {ok, Packet} -> recv_data(TLSSock, Packet, Length); - {error, _Reason} = Error -> Error - end; - <<0, In/binary>> -> {ok, In}; - <<1, Error/binary>> -> {error, (Error)} + case recv_data(TLSSock, <<>>, Length) of + {ok, <<>>} -> + case gen_tcp:recv(TCPSocket, 0, Timeout) of + {ok, Packet} -> recv_data(TLSSock, Packet, Length); + {error, _Reason} = Error -> Error + end; + Res -> Res end. -spec recv_data(tls_socket(), binary()) -> {error, inet:posix() | binary()} | @@ -207,7 +210,8 @@ <>) of {'EXIT', {badarg, _}} -> {error, einval}; - <<0, In/binary>> -> + <<0, In/binary>> -> {ok, In}; + <<2, In/binary>> -> case catch port_control(Port, ?GET_ENCRYPTED_OUTPUT, []) of {'EXIT', {badarg, _}} -> {error, einval}; <<0, Out/binary>> -> @@ -225,8 +229,7 @@ -spec send(tls_socket(), binary()) -> ok | {error, inet:posix() | binary() | timeout}. -send(#tlssock{tcpsock = TCPSocket, tlsport = Port} = - TLSSock, +send(#tlssock{tcpsock = TCPSocket, tlsport = Port}, Packet) -> case catch port_control(Port, ?SET_DECRYPTED_OUTPUT, Packet) of @@ -237,12 +240,7 @@ <<0, Out/binary>> -> gen_tcp:send(TCPSocket, Out); <<1, Error/binary>> -> {error, (Error)} end; - <<1, Error/binary>> -> {error, (Error)}; - <<2>> -> % Dirty hack - receive - {timeout, _Timer, _} -> {error, timeout} - after 100 -> send(TLSSock, Packet) - end + <<1, Error/binary>> -> {error, Error} end. -spec setopts(tls_socket(), list()) -> ok | {error, inet:posix()}. diff -Nru erlang-p1-tls-0.2015.02.04/vars.config.in erlang-p1-tls-1.0.0/vars.config.in --- erlang-p1-tls-0.2015.02.04/vars.config.in 1970-01-01 00:00:00.000000000 +0000 +++ erlang-p1-tls-1.0.0/vars.config.in 2016-01-05 11:20:15.000000000 +0000 @@ -0,0 +1,7 @@ +{cflags, "@CFLAGS@"}. +{ldflags, "@LDFLAGS@"}. + +%% Local Variables: +%% mode: erlang +%% End: +%% vim: set filetype=erlang tabstop=8: