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