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