pkgsrc/security/openssl/Makefile
jperkin e362a06526 openssl: Update to 1.1.1k.
Approved by @wiz during freeze.

Changes between 1.1.1j and 1.1.1k [25 Mar 2021]

 *) Fixed a problem with verifying a certificate chain when using the
    X509_V_FLAG_X509_STRICT flag. This flag enables additional security checks
    of the certificates present in a certificate chain. It is not set by
    default.

    Starting from OpenSSL version 1.1.1h a check to disallow certificates in
    the chain that have explicitly encoded elliptic curve parameters was added
    as an additional strict check.

    An error in the implementation of this check meant that the result of a
    previous check to confirm that certificates in the chain are valid CA
    certificates was overwritten. This effectively bypasses the check
    that non-CA certificates must not be able to issue other certificates.

    If a "purpose" has been configured then there is a subsequent opportunity
    for checks that the certificate is a valid CA.  All of the named "purpose"
    values implemented in libcrypto perform this check.  Therefore, where
    a purpose is set the certificate chain will still be rejected even when the
    strict flag has been used. A purpose is set by default in libssl client and
    server certificate verification routines, but it can be overridden or
    removed by an application.

    In order to be affected, an application must explicitly set the
    X509_V_FLAG_X509_STRICT verification flag and either not set a purpose
    for the certificate verification or, in the case of TLS client or server
    applications, override the default purpose.
    (CVE-2021-3450)
    [Tomáš Mráz]

 *) Fixed an issue where an OpenSSL TLS server may crash if sent a maliciously
    crafted renegotiation ClientHello message from a client. If a TLSv1.2
    renegotiation ClientHello omits the signature_algorithms extension (where
    it was present in the initial ClientHello), but includes a
    signature_algorithms_cert extension then a NULL pointer dereference will
    result, leading to a crash and a denial of service attack.

    A server is only vulnerable if it has TLSv1.2 and renegotiation enabled
    (which is the default configuration). OpenSSL TLS clients are not impacted
    by this issue.
    (CVE-2021-3449)
    [Peter Kästle and Samuel Sapalski]
2021-03-25 16:36:19 +00:00

98 lines
2.9 KiB
Makefile

# $NetBSD: Makefile,v 1.269 2021/03/25 16:36:19 jperkin Exp $
DISTNAME= openssl-1.1.1k
CATEGORIES= security
MASTER_SITES= https://www.openssl.org/source/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://www.openssl.org/
COMMENT= Secure Socket Layer and cryptographic library
LICENSE= openssl
USE_GCC_RUNTIME= yes
USE_TOOLS+= fgrep gmake makedepend perl
BUILD_TARGET= depend all
TEST_TARGET= tests
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= ./config
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib
CONFIGURE_ARGS+= --openssldir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= shared
.include "../../mk/bsd.prefs.mk"
.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-powerpc)
# No {get,make,set}context support before Darwin 9
CONFIGURE_ARGS+= no-async
.endif
.include "options.mk"
CONFIGURE_ARGS+= ${CFLAGS} ${LDFLAGS}
CONFIGURE_ENV+= PERL=${PERL5:Q}
# If the config script cannot guess the host system correctly then we need to
# specify it manually and call the Configure script directly.
OPENSSL_HOST.SunOS-i386= solaris-x86-gcc
OPENSSL_HOST.SunOS-x86_64= solaris64-x86_64-gcc
OPENSSL_HOST.Darwin-aarch64= darwin64-arm64-cc
LDFLAGS.SunOS+= -lrt
CPPFLAGS.OpenBSD+= -D__STDC_NO_ATOMICS__
.if defined(OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH})
CONFIG_SHELL= ${PERL5}
CONFIGURE_SCRIPT= ./Configure
CONFIGURE_ARGS+= ${OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH}}
.endif
PKGCONFIG_OVERRIDE+= libcrypto.pc libssl.pc openssl.pc
PKGCONFIG_OVERRIDE_STAGE= post-build
PKG_SYSCONFSUBDIR= openssl
CONF_FILES= ${PREFIX}/share/examples/openssl/openssl.cnf \
${PKG_SYSCONFDIR}/openssl.cnf
OWN_DIRS= ${PKG_SYSCONFDIR}/certs ${PKG_SYSCONFDIR}/private
INSTALLATION_DIRS+= share/examples/openssl
#
# Note that this package cannot be updated solely from Darwin, it relies on
# shlib-dylib.awk to convert the normal .so entries to dylib, which doesn't
# work the other way around. The lib/engines-1.1 plugins also need special
# handling.
#
OPSYSVARS+= SOEXT
SOEXT.Darwin= dylib
SOEXT.*= so
PLIST_SUBST+= SOEXT=${SOEXT}
PRINT_PLIST_AWK+= /^lib\/engines/ { gsub(/\.${SOEXT}$$/, ".$${SOEXT}"); }
# Remove CC from the environment, to fix GCC version handling on HP-UX,
# SunOS and Linux/sparc.
#
# See https://github.com/openssl/openssl/issues/11060.
do-configure:
${RUN} cd ${WRKSRC} && ${SETENV} ${_CONFIGURE_SCRIPT_ENV:NCC=*} \
${CONFIG_SHELL} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
#
# Get rid of ridiculous namespace collisions like passwd.1 and just leave the
# openssl-*.1 style variants. On a more practical note this avoids creating
# a conflict with moreutils (ts.1).
#
post-install:
cd ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1; \
for f in openssl-*; do \
${RM} -f $${f}; \
${MV} `${ECHO} $${f} | ${SED} -e 's/openssl-//'` $${f}; \
done; \
${RM} -f openssl-c_rehash.1; \
${LN} -s openssl-rehash.1 c_rehash.1
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"