Diff

Differences From Artifact [8520dac550]:

To Artifact [1f2a192f9a]:


    24     24   
    25     25   	(
    26     26   		rm -rf libressl-*
    27     27   
    28     28   		gzip -dc "${pkgdir}/${archive}" | tar -xf - || exit 1
    29     29   
    30     30   		cd "libressl-${version}" || exit 1
           31  +
           32  +		# This defeats hardening attempts that break on various platforms
           33  +		CFLAGS=' -g -O0 '
           34  +		export CFLAGS
    31     35   
    32     36   		./configure ${CONFIGUREEXTRA} --disable-shared --enable-static --prefix="$(pwd)/INST" || exit 1
    33     37   
    34     38   		# Disable building the apps -- they do not get used
    35     39   		rm -rf apps
    36     40   		mkdir apps
    37     41   		cat << \_EOF_ > apps/Makefile
................................................................................
    45     49   	) || return 1
    46     50   
    47     51   	SSLDIR="$(pwd)/libressl-${version}/INST"
    48     52   	addlibs_LOCALSSL="$(PKG_CONFIG_PATH="${SSLDIR}/lib/pkgconfig" "${PKG_CONFIG:-pkg-config}" libssl libcrypto --libs --static)"
    49     53   }
    50     54   
    51     55   function preconfigure() {
    52         -	# Disable SSLv2, newer SSL libraries drop support for it entirely
    53         -	CFLAGS="${CFLAGS} -DNO_SSL2=1"
    54         -
    55         -	# Disable SSLv3, newer SSL libraries drop support for it entirely
    56         -	CFLAGS="${CFLAGS} -DNO_SSL3=1"
    57         -
    58     56   	# Determine SSL directory
    59     57   	if [ -z "${CPP}" ]; then
    60     58   		CPP="${CC:-cc} -E"
    61     59   	fi
    62     60   
    63     61   	if [ -n "${KC_TLS_SSLDIR}" ]; then
    64     62   		SSLDIR="${KC_TLS_SSLDIR}"
................................................................................
    78     76   
    79     77   			return 1
    80     78   		fi
    81     79   	fi
    82     80   
    83     81   	# Add SSL library to configure options
    84     82   	configure_extra=(--with-ssl-dir="${SSLDIR}")
           83  +
           84  +	# Disable SSLv2, newer SSL libraries drop support for it entirely
           85  +	CFLAGS="${CFLAGS} -DNO_SSL2=1"
           86  +
           87  +	# Disable SSLv3, newer SSL libraries drop support for it entirely
           88  +	CFLAGS="${CFLAGS} -DNO_SSL3=1"
           89  +	export CFLAGS
    85     90   }
    86     91   
    87     92   function postconfigure() {
    88     93   	local linkaddfile
    89     94   	local addlibs
    90     95   
    91     96   	# Determine SSL library directory