xref: /openbmc/qemu/crypto/meson.build (revision d2dfe0b5)
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
49crypto_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
50
51util_ss.add(files('sm4.c'))
52util_ss.add(files('aes.c'))
53util_ss.add(files('init.c'))
54if gnutls.found()
55  util_ss.add(gnutls)
56endif
57
58if gcrypt.found()
59  util_ss.add(gcrypt, files('random-gcrypt.c'))
60elif gnutls.found()
61  util_ss.add(gnutls, files('random-gnutls.c'))
62elif get_option('rng_none')
63  util_ss.add(files('random-none.c'))
64else
65  util_ss.add(files('random-platform.c'))
66endif
67
68