blob: e1ac445b3bbef625a1ac26fcbe5d836df6b3a176 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# $FreeBSD$
.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
SRCS+= crypto_openssl.c
DPADD+= ${LIBSSL} ${LIBCRYPTO}
LDADD+= -lssl -lcrypto
.else
CFLAGS+=-DCONFIG_CRYPTO_INTERNAL
SRCS+= crypto_internal.c
CONFIG_INTERNAL_AES=y
CONFIG_INTERNAL_DES=y
CONFIG_INTERNAL_MD4=y
CONFIG_INTERNAL_MD5=y
CONFIG_INTERNAL_RC4=y
CONFIG_INTERNAL_SHA1=y
CONFIG_INTERNAL_SHA256=y
CONFIG_INTERNAL_TLS=y
NEED_AES_ENC=true
.endif
.if defined(TLS_FUNCS)
NEED_TLS_PRF=y
.if defined(CONFIG_INTERNAL_TLS)
CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \
-DCONFIG_TLS_INTERNAL_CLIENT
SRCS+= asn1.c \
bignum.c \
crypto_internal-cipher.c \
crypto_internal-modexp.c \
crypto_internal-rsa.c \
pkcs1.c \
pkcs5.c \
pkcs8.c \
rsa.c \
tls_internal.c \
tlsv1_common.c \
tlsv1_record.c \
tlsv1_cred.c \
tlsv1_client.c \
tlsv1_client_write.c \
tlsv1_client_read.c \
x509v3.c
NEED_DES=y
NEED_MD4=y
NEED_RC4=y
.else
CFLAGS+=-DEAP_TLS_OPENSSL
SRCS+= tls_openssl.c
.endif
.endif
.if defined(CONFIG_INTERNAL_AES)
SRCS+= aes-internal.c \
aes-internal-dec.c \
aes-internal-enc.c
.endif
.if defined(NEED_AES_CBC)
SRCS+= aes-cbc.c
.endif
.if defined(NEED_AES_EAX)
SRCS+= aes-eax.c
NEED_AES_CTR=y
.endif
.if defined(NEED_AES_CTR)
SRCS+= aes-ctr.c
.endif
.if defined(NEED_AES_ENCBLOCK)
SRCS+= aes-encblock.c
.endif
.if defined(NEED_AES_OMAC1)
SRCS+= aes-omac1.c
.endif
.if defined(NEED_DES)
.if defined(CONFIG_INTERNAL_DES)
SRCS+= des-internal.c
.endif
.endif
.if defined(NEED_MD4)
.if defined(CONFIG_INTERNAL_MD4)
SRCS+= md4-internal.c
.endif
.endif
.if defined(CONFIG_INTERNAL_MD5)
SRCS+= md5-internal.c
.endif
.if defined(NEED_FIPS186_2_PRF)
.if defined(CONFIG_INTERNAL_SHA1)
SRCS+= fips_prf_internal.c
.else
SRCS+= fips_prf_openssl.c
.endif
.endif
.if defined(CONFIG_INTERNAL_RC4)
SRCS+= rc4.c
.endif
.if defined(CONFIG_INTERNAL_SHA1)
SRCS+= sha1-internal.c
.endif
.if defined(NEED_SHA256)
CFLAGS+=-DCONFIG_SHA256
SRCS+= sha256.c
.if defined(CONFIG_INTERNAL_SHA256)
SRCS+= sha256-internal.c
.endif
.endif
.if defined(NEED_TLS_PRF)
SRCS+= sha1-tlsprf.c
.endif
|