summaryrefslogtreecommitdiff
path: root/lib/crypto/wscript_build
blob: 9a7c715754dff48cb7115f0aa028b4d2eba5e144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env python

extra_deps = ''

if bld.CONFIG_SET("HAVE_AESNI_INTEL"):
        extra_deps += ' aesni-intel'

bld.SAMBA_SUBSYSTEM('GNUTLS_HELPERS',
                    source='''
                    gnutls_error.c
                    gnutls_arcfour_confounded_md5.c
                    ''',
                    deps='gnutls samba-errors');

# We have a GnuTLS DCEPRC backupkey implementation for the server and the test.
# However this is only working with GnuTLS >= 3.4.7. So we need to keep this
# around till we can require at least GnuTLS in a newer version.
bld.SAMBA_SUBSYSTEM('LIBCRYPTO_RC4',
                    source='arcfour.c',
                    deps='talloc',
                    enabled=not bld.CONFIG_SET('HAVE_GNUTLS_3_4_7'))

bld.SAMBA_SUBSYSTEM('LIBCRYPTO_AES_CCM',
                    source='aes_ccm_128.c',
                    deps='talloc')

bld.SAMBA_SUBSYSTEM('LIBCRYPTO_AES_GCM',
                    source='aes_gcm_128.c',
                    deps='talloc')

bld.SAMBA_SUBSYSTEM('LIBCRYPTO_AES',
                    source='aes.c rijndael-alg-fst.c',
                    deps='talloc')

bld.SAMBA_SUBSYSTEM('LIBCRYPTO_AES_CMAC',
                    source='aes_cmac_128.c',
                    deps='talloc')

bld.SAMBA_SUBSYSTEM('LIBCRYPTO',
        source='''
               md4.c
               ''',
        deps='''
             talloc
             LIBCRYPTO_RC4
             LIBCRYPTO_AES
             LIBCRYPTO_AES_CCM
             LIBCRYPTO_AES_GCM
             LIBCRYPTO_AES_CMAC
             ''' + extra_deps)

bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO_AES_CCM',
                    source='aes_ccm_128_test.c',
                    autoproto='aes_ccm_test_proto.h',
                    deps='talloc')

bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO_AES_GCM',
                    source='aes_gcm_128_test.c',
                    autoproto='aes_gcm_test_proto.h',
                    deps='talloc')

bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO_AES_CMAC',
                    source='aes_cmac_128_test.c',
                    autoproto='aes_cmac_test_proto.h',
                    deps='talloc')

bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO',
        source='md4test.c',
        autoproto='test_proto.h',
        deps='''
             LIBCRYPTO
             TORTURE_LIBCRYPTO_AES_CCM
             TORTURE_LIBCRYPTO_AES_GCM
             TORTURE_LIBCRYPTO_AES_CMAC
             ''')

bld.SAMBA_PYTHON('python_crypto',
                 source='py_crypto.c',
                 deps='gnutls talloc',
                 realname='samba/crypto.so')