summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-10-04 16:14:43 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-10-04 17:48:16 +0200
commit472f2458fc5aa5209a454fd91643cb2a7ffdc869 (patch)
tree3e6f2c1e7cd5b1cb8959c18fd8d24bfed6b17b96 /dev-libs/openssl
parentdev-libs/openssl: fix mem leaks with BN_to_ASN1_INTEGER (diff)
downloadgentoo-472f2458fc5aa5209a454fd91643cb2a7ffdc869.tar.gz
gentoo-472f2458fc5aa5209a454fd91643cb2a7ffdc869.tar.bz2
gentoo-472f2458fc5aa5209a454fd91643cb2a7ffdc869.zip
dev-libs/openssl: check pre requirements for USE=sctp
FEATURES=test and USE=sctp requires net.sctp.auth_enable=1 or test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel". Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-libs/openssl')
-rw-r--r--dev-libs/openssl/openssl-1.1.1d-r1.ebuild16
1 files changed, 16 insertions, 0 deletions
diff --git a/dev-libs/openssl/openssl-1.1.1d-r1.ebuild b/dev-libs/openssl/openssl-1.1.1d-r1.ebuild
index db1ec434fd73..1ddfa7ff16f1 100644
--- a/dev-libs/openssl/openssl-1.1.1d-r1.ebuild
+++ b/dev-libs/openssl/openssl-1.1.1d-r1.ebuild
@@ -55,6 +55,22 @@ MULTILIB_WRAPPED_HEADERS=(
usr/include/openssl/opensslconf.h
)
+pkg_setup() {
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ # must check in pkg_setup; sysctl don't work with userpriv!
+ if has test ${FEATURES}; then
+ if use sctp; then
+ # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel"
+ # if sctp.auth_enable is not enabled.
+ local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null)
+ if [[ -z "${sctp_auth_status}" || ${sctp_auth_status} != 1 ]]; then
+ die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!"
+ fi
+ fi
+ fi
+}
+
src_prepare() {
if use bindist; then
mv "${WORKDIR}"/bindist-patches/hobble-openssl "${WORKDIR}" || die