From nobody Wed Jul 05 20:01:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qx9XD1Gpbz4lFYv; Wed, 5 Jul 2023 20:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qx9XC6lydz3QyC; Wed, 5 Jul 2023 20:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qGC+HrHI65zoqTT+HfFHaUqzCSurdiikNzFqjBpR3eo=; b=i5q0dG9y0JhLPCgkkvWW4MsQTsFzPVRJOvSZKKYJ/H6HSqTG76qYhYPKJ4bbj1nQjfcE07 VOTuDBunnOErKR/zogGzbry2RTqak3r0gpRNUEEIIntGMKXQLndTKRzfgRBiut8P0GiPsJ Jhql06papM+o1Mr3tufGbWTe0uN2ghE1SkVAEJgg0hPfQeZV6/RxITkEgkZuFQMqD88zK+ wChsjw9quBfjSPAHj8BdhBcfD/6c27NbHyxFV4bNuNMLObBOc+bCP3Xa7QmREd6zvpl/gb acJn1JC1veItAj/xNfoTRUKH7vbARpWe3/FM4cbHodPygBomYAsyiFn4QbvRhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688587276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qGC+HrHI65zoqTT+HfFHaUqzCSurdiikNzFqjBpR3eo=; b=XNPMQUK8eWWLd0PyodNaICuIF8A2DwuB9AfmZ2QaTAyYyBsd+SBmGVayI7xl4SF3/XbHDG CdPTUmueUBdszQ31PFWh680XX0Ww0sOHr8pswWIIJbQVXWKAJAZvz+4wK82JQy9lY1AjLx 3GjlVxZvgHkLQEKv1XLTVzvYnORY9syS8Co+Ny+Wu4PwARSkatFkSHLAUqVDGS7hYhNvpC 6DDpXK4cDAR1+mtkv/PAoAzSHtLI6ZoaCKtT9KeeNDszdujN4QA8AYFhjDXxJHKQPxSoNe qdVt2OpdpJ3G5/rFfZUYFX3WzUu0SGwdwoDW7+4+g7HpiLguhm0V/xRe0EWvjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688587276; a=rsa-sha256; cv=none; b=fXax2/qq5y199jlvPfEIMzAMz3B9XYw3ej7g2uRrqTipw7GZseov+rjubVzGc4fLk5rgdz iRddwXL1JkYgXmNnPkzqpqEmpGJl9geTHAZX8FARRT8um/Buakj1l8QiA7IYtHAuE+KYOp yYaLGmOBmSdn3jPfs6qg8u7CUpjXb/4wzxTGXC+PpAi8oY11qdmwc9XadYZ5CHSFo9Jx1z YRmiVNzWPkuJszmYfu1JRBPUFXEUUFT05l793GPj3XdnukgdwL/S1a2MS2tnOVjxsHpJgS v7jSJsF7rsqbxBf+t0OIi1rLUW8sfjkNvJ+gomXhu3cCvEEIEustjPXBW4qoCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qx9XC5slSzStq; Wed, 5 Jul 2023 20:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 365K1FZn058689; Wed, 5 Jul 2023 20:01:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 365K1FEe058688; Wed, 5 Jul 2023 20:01:15 GMT (envelope-from git) Date: Wed, 5 Jul 2023 20:01:15 GMT Message-Id: <202307052001.365K1FEe058688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 544deacc90f4 - main - libcrypto: group definitions for libcrypto and fips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 544deacc90f4f6dc93017a6e18b2fdbf3bc4e059 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=544deacc90f4f6dc93017a6e18b2fdbf3bc4e059 commit 544deacc90f4f6dc93017a6e18b2fdbf3bc4e059 Author: Pierre Pronchery AuthorDate: 2023-06-30 17:23:57 +0000 Commit: Mark Johnston CommitDate: 2023-07-05 20:00:54 +0000 libcrypto: group definitions for libcrypto and fips OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. This change makes sure the FIPS module matches build instructions used for libcrypto. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787 --- secure/lib/libcrypto/Makefile | 10 --- secure/lib/libcrypto/Makefile.common | 112 +++++++++++++++++++++++++ secure/lib/libcrypto/Makefile.inc | 103 +---------------------- secure/lib/libcrypto/modules/fips/Makefile | 130 ++++------------------------- 4 files changed, 131 insertions(+), 224 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 28258e796984..4421ea0b0855 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -581,16 +581,6 @@ INCSDIR= ${INCLUDEDIR}/openssl LIBADD= pthread -CFLAGS+= -I${LCRYPTO_SRC}/crypto -CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 -CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 -CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes -CFLAGS+= -I${.OBJDIR} - -.if !empty(SRCS:M*.S) -ACFLAGS+= -Wa,--noexecstack -.endif - SRCS+= buildinf.h CLEANDIRS= openssl diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/Makefile.common new file mode 100644 index 000000000000..7abb73e226fd --- /dev/null +++ b/secure/lib/libcrypto/Makefile.common @@ -0,0 +1,112 @@ +# $FreeBSD$ + +.include + +.if ${TARGET_ENDIANNESS} == 1234 +CFLAGS+= -DL_ENDIAN +.elif ${TARGET_ENDIANNESS} == 4321 +CFLAGS+= -DB_ENDIAN +.endif + +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" +ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ + ${MACHINE_ARCH} == "powerpc64le" +ASM_${MACHINE_ARCH}= +.endif + +.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) +CFLAGS+= -DOPENSSL_CPUID_OBJ +.if defined(ASM_aarch64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_amd64) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_arm) +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DBSAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_i386) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DRMD160_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DWHIRLPOOL_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_powerpc64) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.elif defined(ASM_powerpc64le) +CFLAGS+= -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DAES_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DSHA1_ASM +CFLAGS+= -DSHA256_ASM +CFLAGS+= -DSHA512_ASM +CFLAGS+= -DPOLY1305_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DKECCAK1600_ASM +.endif +.endif + +MANDIR= ${SHAREDIR}/openssl/man/man + +CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" +CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines-3\"" +CFLAGS+= -DMODULESDIR="\"${LIBDIR}/ossl-modules\"" + +CFLAGS+= -DNDEBUG + +CFLAGS+= -I${LCRYPTO_SRC}/crypto +CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 +CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 +CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes +CFLAGS+= -I${.OBJDIR} + +.if !empty(SRCS:M*.S) +ACFLAGS+= -Wa,--noexecstack +.endif diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index d995fb2a0cb2..d462d9f82857 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -14,108 +14,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/include CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include -.include - -.if ${TARGET_ENDIANNESS} == 1234 -CFLAGS+= -DL_ENDIAN -.elif ${TARGET_ENDIANNESS} == 4321 -CFLAGS+= -DB_ENDIAN -.endif - -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" -ASM_${MACHINE_CPUARCH}= -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "powerpc64le" -ASM_${MACHINE_ARCH}= -.endif - -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) -CFLAGS+= -DOPENSSL_CPUID_OBJ -.if defined(ASM_aarch64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_amd64) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_arm) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DBSAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_i386) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DRMD160_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DWHIRLPOOL_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.elif defined(ASM_powerpc64le) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.endif -.endif - -.if defined(LIB) -CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" -CFLAGS+= -DENGINESDIR="\"${LIBDIR}/engines-3\"" -CFLAGS+= -DMODULESDIR="\"${LIBDIR}/ossl-modules\"" -.endif - -CFLAGS+= -DNDEBUG - -MANDIR= ${SHAREDIR}/openssl/man/man +.include "Makefile.common" .for pcfile in ${PCFILES} ${pcfile}: ${pcfile}.in diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 510d017d27ab..c8b79e3badfd 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -4,123 +4,14 @@ SHLIB_NAME?= fips.so CFLAGS+= -DFIPS_MODULE -SRCS= fips_entry.c fipsprov.c self_test.c self_test_kats.c - -# XXX from secure/lib/libcrypto/Makefile.inc -.include - -#.include -# -#.if ${TARGET_ENDIANNESS} == 1234 -#CFLAGS+= -DL_ENDIAN -#.elif ${TARGET_ENDIANNESS} == 4321 -#CFLAGS+= -DB_ENDIAN -#.endif - -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" -ASM_${MACHINE_CPUARCH}= -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "powerpc64le" -ASM_${MACHINE_ARCH}= -.endif +SRCS+= fips_entry.c fipsprov.c self_test.c self_test_kats.c -.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) -CFLAGS+= -DOPENSSL_CPUID_OBJ -.if defined(ASM_aarch64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_amd64) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_arm) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DKECCAK1600_ASM -CFLAGS+= -DBSAES_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_i386) -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+= -DRC4_ASM -CFLAGS+= -DMD5_ASM -CFLAGS+= -DRMD160_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DWHIRLPOOL_ASM -CFLAGS+= -DGHASH_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DPADLOCK_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -.elif defined(ASM_powerpc64) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.elif defined(ASM_powerpc64le) -CFLAGS+= -DOPENSSL_BN_ASM_MONT -CFLAGS+= -DAES_ASM -CFLAGS+= -DVPAES_ASM -CFLAGS+= -DSHA1_ASM -CFLAGS+= -DSHA256_ASM -CFLAGS+= -DSHA512_ASM -CFLAGS+= -DPOLY1305_ASM -CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM -CFLAGS+= -DKECCAK1600_ASM -.endif -.endif +.include "../../Makefile.common" # crypto SRCS+= provider_core.c provider_predefined.c \ core_fetch.c core_algorithm.c core_namemap.c self_test_core.c -# crypto/ec -SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ - ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ - ec2_smpl.c \ - ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ - ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ - curve448/f_generic.c curve448/scalar.c \ - curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ - ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ - curve448/arch_32/f_impl32.c -SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ - threads_pthread.c threads_none.c initthread.c \ - context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ - param_build_set.c der_writer.c threads_lib.c params_dup.c - SRCS+= cpuid.c ctype.c .if defined(ASM_aarch64) SRCS+= arm64cpuid.S armcap.c @@ -172,9 +63,24 @@ SRCS+= dh_lib.c dh_key.c dh_group_params.c dh_check.c dh_backend.c dh_gen.c \ # crypto/dsa SRCS+= dsa_sign.c dsa_vrf.c dsa_lib.c dsa_ossl.c dsa_check.c \ - dsa_key.c dsa_backend.c dsa_gen.c + dsa_key.c dsa_backend.c dsa_gen.c # crypto/ec +SRCS+= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c \ + ec_curve.c ec_check.c ec_key.c ec_kmeth.c ecx_key.c ec_asn1.c \ + ec2_smpl.c \ + ecp_oct.c ec2_oct.c ec_oct.c ecdh_ossl.c \ + ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c \ + curve448/f_generic.c curve448/scalar.c \ + curve448/curve448_tables.c curve448/eddsa.c curve448/curve448.c \ + ec_backend.c ecx_backend.c ecdh_kdf.c curve448/arch_64/f_impl64.c \ + curve448/arch_32/f_impl32.c +SRCS+= cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ + threads_pthread.c threads_none.c initthread.c \ + context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ + param_build_set.c der_writer.c threads_lib.c params_dup.c + +.include .if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c .endif