xref: /openbmc/qemu/crypto/meson.build (revision a6896ebc)
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 gnutls.found()
28  crypto_ss.add(files('x509-utils.c'))
29endif
30
31if nettle.found()
32  crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
33  if hogweed.found()
34    crypto_ss.add(gmp, hogweed)
35  endif
36  if xts == 'private'
37    crypto_ss.add(files('xts.c'))
38  endif
39elif gcrypt.found()
40  crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c'))
41elif gnutls_crypto.found()
42  crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c'))
43else
44  crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
45endif
46
47if have_keyring
48  crypto_ss.add(files('secret_keyring.c'))
49endif
50if have_afalg
51  crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
52endif
53
54system_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
55
56util_ss.add(files(
57  'aes.c',
58  'clmul.c',
59  'init.c',
60  'sm4.c',
61))
62if gnutls.found()
63  util_ss.add(gnutls)
64endif
65
66if gcrypt.found()
67  util_ss.add(gcrypt, files('random-gcrypt.c'))
68elif gnutls.found()
69  util_ss.add(gnutls, files('random-gnutls.c'))
70elif get_option('rng_none')
71  util_ss.add(files('random-none.c'))
72else
73  util_ss.add(files('random-platform.c'))
74endif
75
76