]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/wpa/Makefile.crypto
Merge LLVM libunwind trunk r351319, from just before upstream's
[FreeBSD/FreeBSD.git] / usr.sbin / wpa / Makefile.crypto
1 # $FreeBSD$
2
3 .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
4 SRCS+=  crypto_openssl.c random.c sha1-prf.c sha256-prf.c sha256-tlsprf.c
5 LIBADD+=        ssl crypto
6 CFLAGS+= -DCONFIG_SHA256
7 .else
8 CFLAGS+=-DCONFIG_CRYPTO_INTERNAL
9 SRCS+=  crypto_internal.c random.c
10 CONFIG_INTERNAL_AES=y
11 CONFIG_INTERNAL_DES=y
12 CONFIG_INTERNAL_MD4=y
13 CONFIG_INTERNAL_MD5=y
14 CONFIG_INTERNAL_RC4=y
15 CONFIG_INTERNAL_SHA1=y
16 NEED_SHA256=y
17 CONFIG_INTERNAL_SHA256=y
18 CONFIG_INTERNAL_TLS=y
19 CONFIG_INTERNAL_DH5=y
20 CONFIG_INTERNAL_DH=y
21 NEED_AES_ENC=true
22 NEED_AES_CBC=true
23 .endif
24 NEED_AES_OMAC1=true
25
26 .if defined(TLS_FUNCS)
27 NEED_TLS_PRF=y
28 .if defined(CONFIG_INTERNAL_TLS)
29 CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \
30         -DCONFIG_TLS_INTERNAL_CLIENT
31 SRCS+=  asn1.c \
32         bignum.c \
33         crypto_internal-cipher.c \
34         crypto_internal-modexp.c \
35         crypto_internal-rsa.c \
36         pkcs1.c \
37         pkcs5.c \
38         pkcs8.c \
39         rsa.c \
40         tls_internal.c \
41         tlsv1_common.c \
42         tlsv1_record.c \
43         tlsv1_cred.c \
44         tlsv1_client.c \
45         tlsv1_client_write.c \
46         tlsv1_client_read.c \
47         x509v3.c
48 NEED_DES=y
49 NEED_MD4=y
50 NEED_RC4=y
51 .else
52 CFLAGS+=-DEAP_TLS_OPENSSL
53 SRCS+=  tls_openssl.c tls_openssl_ocsp.c
54 .endif
55 .endif
56
57 .if defined(CONFIG_INTERNAL_AES)
58 SRCS+=  aes-unwrap.c aes-wrap.c \
59         aes-internal.c \
60         aes-internal-dec.c \
61         aes-internal-enc.c
62 .endif
63
64 .if defined(NEED_AES_CBC)
65 SRCS+=  aes-cbc.c
66 .endif
67
68 .if defined(NEED_AES_EAX)
69 SRCS+=  aes-eax.c
70 NEED_AES_CTR=y
71 .endif
72
73 .if defined(NEED_AES_CTR)
74 SRCS+=  aes-ctr.c
75 .endif
76
77 .if defined(NEED_AES_ENCBLOCK)
78 SRCS+=  aes-encblock.c
79 .endif
80
81 .if defined(NEED_AES_OMAC1)
82 SRCS+=  aes-omac1.c
83 .endif
84
85 .if defined(NEED_DES)
86 .if defined(CONFIG_INTERNAL_DES)
87 SRCS+=  des-internal.c
88 .endif
89 .endif
90
91 .if defined(NEED_MD4)
92 .if defined(CONFIG_INTERNAL_MD4)
93 SRCS+=  md4-internal.c
94 .endif
95 .endif
96
97 .if defined(CONFIG_INTERNAL_MD5)
98 SRCS+=  md5.c md5-internal.c
99 .endif
100
101 .if defined(NEED_FIPS186_2_PRF)
102 .if defined(CONFIG_INTERNAL_SHA1)
103 SRCS+=  fips_prf_internal.c
104 .else
105 SRCS+=  fips_prf_openssl.c
106 .endif
107 .endif
108
109 .if defined(CONFIG_INTERNAL_RC4)
110 SRCS+=  rc4.c
111 .endif
112
113 .if defined(CONFIG_INTERNAL_SHA1)
114 SRCS+=  sha1-internal.c sha1-pbkdf2.c sha1.c sha1-prf.c
115 .endif
116
117 .if defined(NEED_SHA256)
118 CFLAGS+=-DCONFIG_SHA256
119 SRCS+=  sha256.c
120 .if defined(CONFIG_INTERNAL_SHA256)
121 SRCS+=  sha256-internal.c sha256-prf.c
122 .endif
123 .endif
124
125 .if defined(NEED_TLS_PRF)
126 SRCS+=  sha1-tlsprf.c
127 .endif
128
129 .if defined(CONFIG_INTERNAL_DH5)
130 SRCS+=  dh_group5.c
131 .endif
132
133 .if defined(CONFIG_INTERNAL_DH)
134 SRCS+=  dh_groups.c
135 .endif