kernel - Bring in dff23c692 from FreeBSD
[dragonfly.git] / usr.sbin / 802_11 / Makefile.crypto
blob09608d3f1dec44e7b1d7e9ad053d8a3cee13bd22
1 # $FreeBSD: head/usr.sbin/wpa/Makefile.crypto 252726 2013-07-04 21:12:58Z rpaulo $
3 #.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
4 SRCS+=  crypto_openssl.c random.c sha1-prf.c sha256-prf.c
5 DPADD+= ${LIBSSL} ${LIBCRYPTO}
6 LDADD+= -lssl -lcrypto
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 #.endif
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
56 .if defined(CONFIG_INTERNAL_AES)
57 SRCS+=  aes-internal.c \
58         aes-internal-dec.c \
59         aes-internal-enc.c
60 .endif
62 .if defined(NEED_AES_CBC)
63 SRCS+=  aes-cbc.c
64 .endif
66 .if defined(NEED_AES_EAX)
67 SRCS+=  aes-eax.c
68 NEED_AES_CTR=y
69 .endif
71 .if defined(NEED_AES_CTR)
72 SRCS+=  aes-ctr.c
73 .endif
75 .if defined(NEED_AES_ENCBLOCK)
76 SRCS+=  aes-encblock.c
77 .endif
79 .if defined(NEED_AES_OMAC1)
80 SRCS+=  aes-omac1.c
81 .endif
83 .if defined(NEED_DES)
84 .if defined(CONFIG_INTERNAL_DES)
85 SRCS+=  des-internal.c
86 .endif
87 .endif
89 .if defined(NEED_MD4)
90 .if defined(CONFIG_INTERNAL_MD4)
91 SRCS+=  md4-internal.c
92 .endif
93 .endif
95 .if defined(CONFIG_INTERNAL_MD5)
96 SRCS+=  md5-internal.c
97 .endif
99 .if defined(NEED_FIPS186_2_PRF)
100 .if defined(CONFIG_INTERNAL_SHA1)
101 SRCS+=  fips_prf_internal.c
102 .else
103 SRCS+=  fips_prf_openssl.c
104 .endif
105 .endif
107 .if defined(CONFIG_INTERNAL_RC4)
108 SRCS+=  rc4.c
109 .endif
111 .if defined(CONFIG_INTERNAL_SHA1)
112 SRCS+=  sha1-internal.c sha1-pbkdf2.c sha1.c sha1-prf.c
113 .endif
115 .if defined(NEED_SHA256)
116 CFLAGS+=-DCONFIG_SHA256
117 SRCS+=  sha256.c
118 .if defined(CONFIG_INTERNAL_SHA256)
119 SRCS+=  sha256-internal.c sha256-prf.c
120 .endif
121 .endif
123 .if defined(NEED_TLS_PRF)
124 SRCS+=  sha1-tlsprf.c
125 .endif
127 .if defined(CONFIG_INTERNAL_DH5)
128 SRCS+=  dh_group5.c
129 .endif
131 .if defined(CONFIG_INTERNAL_DH)
132 SRCS+=  dh_groups.c
133 .endif