pkgsrc/security/openssl/Makefile
fhajny fbd28ecc36 security/openssl: Update to 1.0.2p.
- Client DoS due to large DH parameter

  During key agreement in a TLS handshake using a DH(E) based ciphersuite a
  malicious server can send a very large prime value to the client. This will
  cause the client to spend an unreasonably long period of time generating a
  key for this prime resulting in a hang until the client has finished. This
  could be exploited in a Denial Of Service attack.

  This issue was reported to OpenSSL on 5th June 2018 by Guido Vranken
  (CVE-2018-0732)
  [Guido Vranken]

- Cache timing vulnerability in RSA Key Generation

  The OpenSSL RSA Key generation algorithm has been shown to be vulnerable to
  a cache timing side channel attack. An attacker with sufficient access to
  mount cache timing attacks during the RSA key generation process could
  recover the private key.

  This issue was reported to OpenSSL on 4th April 2018 by Alejandro Cabrera
  Aldaya, Billy Brumley, Cesar Pereida Garcia and Luis Manuel Alvarez Tapia.
  (CVE-2018-0737)
  [Billy Brumley]

- Make EVP_PKEY_asn1_new() a bit stricter about its input.  A NULL pem_str
  parameter is no longer accepted, as it leads to a corrupt table.  NULL
  pem_str is reserved for alias entries only.
  [Richard Levitte]

- Revert blinding in ECDSA sign and instead make problematic addition
  length-invariant. Switch even to fixed-length Montgomery multiplication.
  [Andy Polyakov]

- Change generating and checking of primes so that the error rate of not
  being prime depends on the intended use based on the size of the input.
  For larger primes this will result in more rounds of Miller-Rabin.
  The maximal error rate for primes with more than 1080 bits is lowered
  to 2^-128.
  [Kurt Roeckx, Annie Yousar]

- Increase the number of Miller-Rabin rounds for DSA key generating to 64.
  [Kurt Roeckx]

- Add blinding to ECDSA and DSA signatures to protect against side channel
  attacks discovered by Keegan Ryan (NCC Group).
  [Matt Caswell]

- When unlocking a pass phrase protected PEM file or PKCS#8 container, we
  now allow empty (zero character) pass phrases.
  [Richard Levitte]

- Certificate time validation (X509_cmp_time) enforces stricter
  compliance with RFC 5280. Fractional seconds and timezone offsets
  are no longer allowed.
  [Emilia Käsper]
2018-09-12 12:44:17 +00:00

185 lines
5.1 KiB
Makefile

# $NetBSD: Makefile,v 1.240 2018/09/12 12:44:17 fhajny Exp $
DISTNAME= openssl-1.0.2p
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
CONFLICTS= SSLeay-[0-9]* ssleay-[0-9]*
BUILD_DEPENDS+= p5-Perl4-CoreLibs-[0-9]*:../../devel/p5-Perl4-CoreLibs
USE_GCC_RUNTIME= yes
USE_TOOLS+= fgrep gmake makedepend perl:run
BUILD_TARGET= depend all
TEST_TARGET= tests
MAKE_JOBS_SAFE= no
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= ./config
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --install_prefix=${DESTDIR}
CONFIGURE_ARGS+= --openssldir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= shared no-fips
.include "../../mk/compiler.mk"
# Avoid dependency on 'makedepend' on platforms where the default CC is set
# to 'cc' not 'gcc' in boostrap-mk-files. OpenSSL only supports the latter.
.if ${PKGSRC_COMPILER} == "gcc" && ${CC} == "cc"
CC= gcc
.endif
.if ${OPSYS} == "SunOS"
. if ${MACHINE_ARCH} == "sparc"
OPENSSL_MACHINE_ARCH= sparcv7
. elif ${MACHINE_ARCH} == "sparc64"
OPENSSL_MACHINE_ARCH= sparcv9
. elif ${MACHINE_ARCH} == "i386"
OPENSSL_MACHINE_ARCH= x86
. elif ${MACHINE_ARCH} == "x86_64"
OPENSSL_MACHINE_ARCH= ${MACHINE_ARCH}
. endif
# only override the configure target if we know the platform, falling
# back to ./config's autodetection if not.
. if defined(OPENSSL_MACHINE_ARCH) && !empty(OPENSSL_MACHINE_ARCH)
CONFIGURE_SCRIPT= ./Configure
. if ${PKGSRC_COMPILER} == "clang" || ${PKGSRC_COMPILER} == "gcc"
CONFIGURE_ARGS+= solaris${${ABI}==64:?64:}-${OPENSSL_MACHINE_ARCH}-gcc
. else
CONFIGURE_ARGS+= solaris${${ABI}==64:?64:}-${OPENSSL_MACHINE_ARCH}-cc
. endif
. endif
.elif ${OPSYS} == "IRIX"
CONFIGURE_ARGS+= no-asm
. if defined(ABI) && ${ABI} == "64"
CONFIGURE_SCRIPT= ./Configure
. if !empty(CC_VERSION:Mgcc*)
CONFIGURE_ARGS+= irix64-mips4-gcc
. else
CONFIGURE_ARGS+= irix64-mips4-cc
. endif
. endif
.elif ${OPSYS} == "OSF1"
USE_PLIST_SHLIB= no
CONFIGURE_SCRIPT= ./Configure
. if !empty(CC_VERSION:Mgcc*)
CONFIGURE_ARGS+= tru64-alpha-gcc
. else
CONFIGURE_ARGS+= tru64-alpha-cc
. endif
.elif ${OPSYS} == "Darwin"
CONFIGURE_SCRIPT= ./Configure
. if defined(ABI) && ${ABI} == "64"
_OS= darwin64
. else
_OS= darwin
. endif
. if ${MACHINE_ARCH:Mpowerpc*}
_ARCH= ppc
. else
_ARCH= ${MACHINE_ARCH}
.endif
CONFIGURE_ARGS+= ${_OS}-${_ARCH}-cc
SUBST_CLASSES+= dl
SUBST_MESSAGE.dl= Adding dynamic link compatibility library.
SUBST_STAGE.dl= post-configure
SUBST_FILES.dl= Makefile apps/Makefile crypto/Makefile \
crypto/pkcs7/Makefile test/Makefile
SUBST_SED.dl= -e 's,^EX_LIBS=,EX_LIBS=${DL_LDFLAGS:Q} ,g'
.elif ${OPSYS} == "AIX"
CONFIGURE_SCRIPT= ./Configure
. if defined(ABI) && ${ABI} == "64"
. if !empty(CC_VERSION:Mgcc*)
CONFIGURE_ARGS+= aix64-gcc
. else
CONFIGURE_ARGS+= aix64-cc
. endif
. else
. if !empty(CC_VERSION:Mgcc*)
CONFIGURE_ARGS+= aix-gcc
. else
CONFIGURE_ARGS+= aix-cc
. endif
. endif
.elif ${OPSYS} == "Interix"
SUBST_CLASSES+= soname
SUBST_STAGE.soname= post-configure
SUBST_FILES.soname= Makefile.shared
SUBST_SED.soname= -e 's/-Wl,-soname=/-Wl,-h,/g'
.elif ${OPSYS} == "HPUX"
CONFIGURE_SCRIPT= ./Configure
. if defined(ABI) && ${ABI} == "64"
. if ${MACHINE_ARCH} == "hppa64"
CONFIGURE_ARGS+= hpux64-parisc2-${CC}
. else
CONFIGURE_ARGS+= hpux64-ia64-${CC}
. endif
. else
. if ${MACHINE_ARCH} == "hppa"
CONFIGURE_ARGS+= hpux-parisc-${CC}
. else
CONFIGURE_ARGS+= hpux-ia64-${CC}
. endif
. endif
.elif ${OPSYS} == "Linux"
. if ${MACHINE_ARCH} == "powerpc64"
CONFIGURE_SCRIPT= ./Configure
CONFIGURE_ARGS+= linux-ppc64
. elif ${MACHINE_ARCH} == "i386"
CONFIGURE_SCRIPT= ./Configure
CONFIGURE_ARGS+= linux-elf
. endif
.elif ${OS_VARIANT} == "SCOOSR5"
# SIGILL in _sha1_block_data_order_ssse3().
CONFIGURE_ARGS+= no-sse2
.endif
.include "../../security/openssl/options.mk"
CONFIGURE_ARGS+= ${CFLAGS} ${LDFLAGS}
CONFIGURE_ENV+= PERL=${PERL5:Q}
PKGCONFIG_OVERRIDE+= libcrypto.pc libssl.pc openssl.pc
PKGCONFIG_OVERRIDE_STAGE= post-build
PLIST_SRC+= ${PKGDIR}/PLIST.common
USE_PLIST_SHLIB?= yes
.if ${USE_PLIST_SHLIB} == "yes"
PLIST_SRC+= ${PKGDIR}/PLIST.shlib
.endif
PLIST_SUBST+= SHLIB_VERSION=${OPENSSL_VERS:C/[^0-9]*$//}
PLIST_SUBST+= SHLIB_MAJOR=${OPENSSL_VERS:C/\..*$//}
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
# Fix the path to perl in various scripts.
pre-configure:
cd ${WRKSRC} && ${PERL5} util/perlpath.pl ${PERL5}
# BN_print.3 and bn_print.3 cannot co-exist on Darwin, we choose to remove
# bn_print.3 simply because it has more aliases to the same manual page.
PLIST_VARS+= notmac
.if ${OPSYS} == "Darwin"
post-install:
${CP} -p ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3/BN_print.3 ${WRKDIR}
${RM} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3/bn_print.3*
${MV} -f ${WRKDIR}/BN_print.3 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3
.else
PLIST.notmac= yes
.endif
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"