xref: /openbmc/qemu/crypto/meson.build (revision 3e3df0d8)
1crypto_ss.add(genh)
2crypto_ss.add(files(
3  'afsplit.c',
4  'akcipher.c',
5  'block-luks.c',
6  'block-qcow.c',
7  'block.c',
8  'cipher.c',
9  'der.c',
10  'hash.c',
11  'hmac.c',
12  'ivgen-essiv.c',
13  'ivgen-plain.c',
14  'ivgen-plain64.c',
15  'ivgen.c',
16  'pbkdf.c',
17  'secret_common.c',
18  'secret.c',
19  'tlscreds.c',
20  'tlscredsanon.c',
21  'tlscredspsk.c',
22  'tlscredsx509.c',
23  'tlssession.c',
24  'rsakey.c',
25))
26
27if nettle.found()
28  crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
29  if hogweed.found()
30    crypto_ss.add(gmp, hogweed)
31  endif
32  if xts == 'private'
33    crypto_ss.add(files('xts.c'))
34  endif
35elif gcrypt.found()
36  crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c'))
37elif gnutls_crypto.found()
38  crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c'))
39else
40  crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
41endif
42
43if have_keyring
44  crypto_ss.add(files('secret_keyring.c'))
45endif
46if have_afalg
47  crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
48endif
49
50system_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
51
52util_ss.add(files(
53  'aes.c',
54  'clmul.c',
55  'init.c',
56  'sm4.c',
57))
58if gnutls.found()
59  util_ss.add(gnutls)
60endif
61
62if gcrypt.found()
63  util_ss.add(gcrypt, files('random-gcrypt.c'))
64elif gnutls.found()
65  util_ss.add(gnutls, files('random-gnutls.c'))
66elif get_option('rng_none')
67  util_ss.add(files('random-none.c'))
68else
69  util_ss.add(files('random-platform.c'))
70endif
71
72