2018-11-04 01:38:04 +08:00
|
|
|
# Note that these directories are filtered in Configure. Look for %skipdir
|
|
|
|
# there for further explanations.
|
2019-05-14 00:07:45 +08:00
|
|
|
SUBDIRS=objects buffer bio stack lhash rand evp asn1 pem x509 conf \
|
2019-11-10 12:16:36 +08:00
|
|
|
txt_db pkcs7 pkcs12 ui kdf store property \
|
2019-06-04 19:43:31 +08:00
|
|
|
md2 md4 md5 sha mdc2 hmac ripemd whrlpool poly1305 \
|
2018-11-04 01:26:35 +08:00
|
|
|
siphash sm3 des aes rc2 rc4 rc5 idea aria bf cast camellia \
|
|
|
|
seed sm4 chacha modes bn ec rsa dsa dh sm2 dso engine \
|
2019-10-31 06:39:35 +08:00
|
|
|
err comp http ocsp cms ts srp cmac ct async ess crmf cmp serializer \
|
2020-01-24 12:09:33 +08:00
|
|
|
ffc
|
2018-11-04 01:26:35 +08:00
|
|
|
|
2016-01-30 06:33:10 +08:00
|
|
|
LIBS=../libcrypto
|
2019-06-16 18:56:21 +08:00
|
|
|
|
|
|
|
$UPLINKSRC=
|
|
|
|
$UPLINKDEF=
|
|
|
|
IF[{- !$disabled{uplink} -}]
|
|
|
|
$UPLINKSRC_common=../ms/uplink.c
|
|
|
|
$UPLINKSRC_x86=$UPLINKSRC_common uplink-x86.s
|
|
|
|
$UPLINKSRC_x86_64=$UPLINKSRC_common uplink-x86_64.s
|
|
|
|
$UPLINKSRC_ia64=$UPLINKSRC_common uplink-ia64.s
|
|
|
|
|
|
|
|
IF[$UPLINKSRC_{- $target{uplink_arch} -}]
|
|
|
|
$UPLINKSRC=$UPLINKSRC_{- $target{uplink_arch} -}
|
|
|
|
$UPLINKDEF=OPENSSL_USE_APPLINK
|
|
|
|
ENDIF
|
|
|
|
ENDIF
|
|
|
|
|
2019-06-17 01:35:08 +08:00
|
|
|
$CPUIDASM=mem_clr.c
|
|
|
|
$CPUIDDEF=
|
|
|
|
IF[{- !$disabled{asm} && $config{processor} ne '386' -}]
|
|
|
|
$CPUIDASM_x86=x86cpuid.s
|
|
|
|
|
|
|
|
$CPUIDASM_x86_64=x86_64cpuid.s
|
|
|
|
|
|
|
|
$CPUIDASM_ia64=ia64cpuid.s
|
|
|
|
|
|
|
|
$CPUIDASM_sparcv9=sparcv9cap.c sparccpuid.S
|
|
|
|
|
|
|
|
$CPUIDASM_alpha=alphacpuid.s
|
|
|
|
|
|
|
|
$CPUIDASM_s390x=s390xcap.c s390xcpuid.S
|
|
|
|
|
|
|
|
$CPUIDASM_armv4=armcap.c armv4cpuid.S
|
|
|
|
|
|
|
|
$CPUIDASM_aarch64=armcap.c arm64cpuid.S
|
|
|
|
|
|
|
|
$CPUIDASM_parisc11=pariscid.s
|
|
|
|
$CPUIDASM_parisc20_64=$CPUIDASM_parisc11
|
|
|
|
|
|
|
|
$CPUIDASM_ppc32=ppccpuid.s ppccap.c
|
|
|
|
$CPUIDASM_ppc64=$CPUIDASM_ppc32
|
|
|
|
|
|
|
|
$CPUIDASM_c64xplus=c64xpluscpuid.s
|
|
|
|
|
|
|
|
# Now that we have defined all the arch specific variables, use the
|
|
|
|
# appropriate one, and define the appropriate macros
|
|
|
|
IF[$CPUIDASM_{- $target{asm_arch} -}]
|
|
|
|
$CPUIDASM=$CPUIDASM_{- $target{asm_arch} -}
|
|
|
|
$CPUIDDEF=OPENSSL_CPUID_OBJ
|
|
|
|
ENDIF
|
|
|
|
ENDIF
|
|
|
|
|
2019-01-20 20:14:58 +08:00
|
|
|
# The Core
|
2019-07-11 05:11:27 +08:00
|
|
|
$CORE_COMMON=provider_core.c provider_predefined.c \
|
2020-03-03 12:02:36 +08:00
|
|
|
core_fetch.c core_algorithm.c core_namemap.c self_test_core.c
|
2019-01-20 20:14:58 +08:00
|
|
|
|
2020-03-03 12:02:36 +08:00
|
|
|
SOURCE[../libcrypto]=$CORE_COMMON provider_conf.c
|
2019-10-04 07:38:17 +08:00
|
|
|
SOURCE[../providers/libfips.a]=$CORE_COMMON
|
2019-04-10 22:01:40 +08:00
|
|
|
|
2019-01-20 20:14:58 +08:00
|
|
|
# Central utilities
|
2019-06-12 18:10:00 +08:00
|
|
|
$UTIL_COMMON=\
|
2019-07-04 00:42:21 +08:00
|
|
|
cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \
|
2019-05-27 23:31:27 +08:00
|
|
|
ctype.c threads_pthread.c threads_win.c threads_none.c initthread.c \
|
2020-04-01 13:51:18 +08:00
|
|
|
context.c sparse_array.c asn1_dsa.c packet.c param_build.c $CPUIDASM \
|
PROV: Add the beginning of a DER writing library
This library is meant to be small and quick. It's based on WPACKET,
which was extended to support DER writing. The way it's used is a
bit unusual, as it's used to write the structures backward into a
given buffer. A typical quick call looks like this:
/*
* Fill in this structure:
*
* something ::= SEQUENCE {
* id OBJECT IDENTIFIER,
* x [0] INTEGER OPTIONAL,
* y [1] BOOLEAN OPTIONAL,
* n INTEGER
* }
*/
unsigned char buf[nnnn], *p = NULL;
size_t encoded_len = 0;
WPACKET pkt;
int ok;
ok = WPACKET_init_der(&pkt, buf, sizeof(buf)
&& DER_w_start_sequence(&pkt, -1)
&& DER_w_bn(&pkt, -1, bn)
&& DER_w_boolean(&pkt, 1, bool)
&& DER_w_precompiled(&pkt, -1, OID, sizeof(OID))
&& DER_w_end_sequence(&pkt, -1)
&& WPACKET_finish(&pkt)
&& WPACKET_get_total_written(&pkt, &encoded_len)
&& (p = WPACKET_get_curr(&pkt)) != NULL;
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11450)
2020-03-31 22:54:43 +08:00
|
|
|
param_build_set.c der_writer.c
|
2019-06-17 01:35:08 +08:00
|
|
|
$UTIL_DEFINE=$CPUIDDEF
|
2019-03-20 22:27:52 +08:00
|
|
|
|
2019-06-12 18:10:00 +08:00
|
|
|
SOURCE[../libcrypto]=$UTIL_COMMON \
|
2019-12-05 02:15:08 +08:00
|
|
|
mem.c mem_sec.c \
|
2019-07-11 13:53:59 +08:00
|
|
|
cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \
|
2020-05-07 14:08:18 +08:00
|
|
|
o_fopen.c getenv.c o_init.c init.c trace.c provider.c \
|
2019-07-04 00:30:03 +08:00
|
|
|
$UPLINKSRC
|
2019-10-04 07:38:17 +08:00
|
|
|
SOURCE[../providers/libfips.a]=$UTIL_COMMON
|
2020-04-09 18:49:23 +08:00
|
|
|
SOURCE[../providers/liblegacy.a]=$UTIL_COMMON
|
2019-06-12 18:10:00 +08:00
|
|
|
|
2019-10-15 10:35:41 +08:00
|
|
|
# Implementations are now spread across several libraries, so the defines
|
|
|
|
# need to be applied to all affected libraries and modules.
|
|
|
|
DEFINE[../libcrypto]=$UTIL_DEFINE $UPLINKDEF
|
|
|
|
DEFINE[../providers/libfips.a]=$UTIL_DEFINE
|
|
|
|
DEFINE[../providers/fips]=$UTIL_DEFINE
|
|
|
|
DEFINE[../providers/libimplementations.a]=$UTIL_DEFINE
|
2020-04-09 18:49:23 +08:00
|
|
|
DEFINE[../providers/liblegacy.a]=$UTIL_DEFINE
|
2019-05-31 18:15:10 +08:00
|
|
|
DEFINE[../providers/libcommon.a]=$UTIL_DEFINE
|
2019-03-20 22:27:52 +08:00
|
|
|
|
2019-09-21 06:01:04 +08:00
|
|
|
DEPEND[info.o]=buildinf.h
|
2016-01-30 06:33:10 +08:00
|
|
|
DEPEND[cversion.o]=buildinf.h
|
2018-03-09 19:39:01 +08:00
|
|
|
GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
|
2016-01-30 10:25:40 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[uplink-x86.s]=../ms/uplink-x86.pl
|
|
|
|
GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl
|
|
|
|
GENERATE[uplink-ia64.s]=../ms/uplink-ia64.pl
|
2016-01-30 14:14:58 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[x86cpuid.s]=x86cpuid.pl
|
2016-03-07 22:00:45 +08:00
|
|
|
DEPEND[x86cpuid.s]=perlasm/x86asm.pl
|
2016-01-30 10:25:40 +08:00
|
|
|
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[x86_64cpuid.s]=x86_64cpuid.pl
|
2016-01-30 10:25:40 +08:00
|
|
|
|
2016-03-07 22:00:45 +08:00
|
|
|
GENERATE[ia64cpuid.s]=ia64cpuid.S
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[ppccpuid.s]=ppccpuid.pl
|
|
|
|
GENERATE[pariscid.s]=pariscid.pl
|
2016-03-07 22:00:45 +08:00
|
|
|
GENERATE[alphacpuid.s]=alphacpuid.pl
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[arm64cpuid.S]=arm64cpuid.pl
|
2016-03-11 20:44:46 +08:00
|
|
|
INCLUDE[arm64cpuid.o]=.
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[armv4cpuid.S]=armv4cpuid.pl
|
2016-03-11 20:44:46 +08:00
|
|
|
INCLUDE[armv4cpuid.o]=.
|
2019-09-13 06:05:26 +08:00
|
|
|
GENERATE[s390xcpuid.S]=s390xcpuid.pl
|
2017-10-02 21:53:00 +08:00
|
|
|
INCLUDE[s390xcpuid.o]=.
|
2016-03-29 22:48:02 +08:00
|
|
|
|
|
|
|
IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}]
|
|
|
|
SHARED_SOURCE[../libcrypto]=dllmain.c
|
|
|
|
ENDIF
|