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