xref: /freebsd/lib/libbearssl/Makefile.libsa.inc (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1# This file is included by libsa
2# It contains SRCS needed for loader
3
4.PATH: ${.PARSEDIR}
5
6.include "Makefile.inc"
7
8.PATH: ${BEARSSL_SRC}
9
10CFLAGS+=  -I${BEARSSL_SRC}
11
12# we do not need/want nested objdirs
13OBJS_SRCS_FILTER = T R
14
15# we list only the srcs the loader(s) actually needs
16SRCS+= \
17	codec/ccopy.c \
18	codec/dec32be.c \
19	codec/dec64be.c \
20	codec/enc32be.c \
21	codec/enc64be.c \
22	codec/pemdec.c \
23
24SRCS+= \
25	ec/ec_all_m31.c \
26	ec/ec_c25519_m31.c \
27	ec/ec_c25519_m62.c \
28	ec/ec_c25519_m64.c \
29	ec/ec_default.c \
30	ec/ec_p256_m31.c \
31	ec/ec_p256_m62.c \
32	ec/ec_p256_m64.c \
33	ec/ec_prime_i31.c \
34	ec/ec_pubkey.c \
35	ec/ec_secp256r1.c \
36	ec/ec_secp384r1.c \
37	ec/ec_secp521r1.c \
38	ec/ecdsa_atr.c \
39	ec/ecdsa_default_vrfy_asn1.c \
40	ec/ecdsa_i31_bits.c \
41	ec/ecdsa_i31_vrfy_asn1.c \
42	ec/ecdsa_i31_vrfy_raw.c \
43
44# Note: sha1 is needed for OpenPGP (keyId)
45SRCS+= \
46	hash/multihash.c \
47	hash/sha1.c \
48	hash/sha2big.c \
49	hash/sha2small.c \
50
51SRCS+= \
52	int/i31_add.c \
53	int/i31_bitlen.c \
54	int/i31_decmod.c \
55	int/i31_decode.c \
56	int/i31_encode.c \
57	int/i31_fmont.c \
58	int/i31_iszero.c \
59	int/i31_moddiv.c \
60	int/i31_modpow.c \
61	int/i31_modpow2.c \
62	int/i31_montmul.c \
63	int/i31_muladd.c \
64	int/i31_ninv31.c \
65	int/i31_rshift.c \
66	int/i31_sub.c \
67	int/i31_tmont.c \
68	int/i32_div32.c \
69	int/i62_modpow2.c \
70
71SRCS+= \
72	rsa/rsa_default_pkcs1_vrfy.c \
73	rsa/rsa_i31_pkcs1_vrfy.c \
74	rsa/rsa_i31_pub.c \
75	rsa/rsa_i62_pkcs1_vrfy.c \
76	rsa/rsa_i62_pub.c \
77	rsa/rsa_pkcs1_sig_unpad.c \
78
79
80SRCS+= \
81	x509/asn1enc.c \
82	x509/x509_decoder.c \
83	x509/x509_minimal.c \
84
85# We want find_error_name().
86SRCS+= \
87	${BEARSSL_TOOLS}/errors.c \
88