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