blob: 19c44bea8980a18aaabf1b8b1e18260ebf4de8cf [file] [log] [blame]
Marc-André Lureau5582c582019-07-16 19:28:54 +04001crypto_ss.add(genh)
2crypto_ss.add(files(
3 'afsplit.c',
4 'block-luks.c',
5 'block-qcow.c',
6 'block.c',
7 'cipher.c',
Marc-André Lureau5582c582019-07-16 19:28:54 +04008 'hash.c',
9 'hmac.c',
10 'ivgen-essiv.c',
11 'ivgen-plain.c',
12 'ivgen-plain64.c',
13 'ivgen.c',
14 'pbkdf.c',
15 'secret_common.c',
16 'secret.c',
17 'tlscreds.c',
18 'tlscredsanon.c',
19 'tlscredspsk.c',
20 'tlscredsx509.c',
21 'tlssession.c',
22))
23
Paolo Bonzini57612512021-06-03 11:15:26 +020024if nettle.found()
25 crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
Daniel P. Berrangé68014042021-07-02 17:00:32 +010026 if xts == 'private'
27 crypto_ss.add(files('xts.c'))
28 endif
Paolo Bonzini57612512021-06-03 11:15:26 +020029elif gcrypt.found()
30 crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c'))
Daniel P. Berrangé9a85ca02021-06-25 18:32:14 +010031elif gnutls_crypto.found()
Daniel P. Berrangé8c1d3dc2021-06-25 18:32:14 +010032 crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c'))
Marc-André Lureau5582c582019-07-16 19:28:54 +040033else
Daniel P. Berrangé46859d92020-09-01 14:30:49 +010034 crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
Marc-André Lureau5582c582019-07-16 19:28:54 +040035endif
Marc-André Lureau5582c582019-07-16 19:28:54 +040036
37crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyring.c'))
Paolo Bonzini34b52612021-11-08 14:02:42 +010038if have_afalg
39 crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
40endif
Paolo Bonzini57612512021-06-03 11:15:26 +020041crypto_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
Daniel P. Berrangé46859d92020-09-01 14:30:49 +010042
Paolo Bonzinia81df1b2020-08-19 08:44:56 -040043util_ss.add(files('aes.c'))
44util_ss.add(files('init.c'))
Daniel P. Berrangécc4c7c72021-06-30 17:20:02 +010045if gnutls.found()
46 util_ss.add(gnutls)
47endif
Daniel P. Berrangé46859d92020-09-01 14:30:49 +010048
Paolo Bonzini57612512021-06-03 11:15:26 +020049if gcrypt.found()
50 util_ss.add(gcrypt, files('random-gcrypt.c'))
51elif gnutls.found()
52 util_ss.add(gnutls, files('random-gnutls.c'))
Paolo Bonzinic55cf6a2021-10-13 11:46:09 +020053elif get_option('rng_none')
Paolo Bonzinia81df1b2020-08-19 08:44:56 -040054 util_ss.add(files('random-none.c'))
55else
56 util_ss.add(files('random-platform.c'))
57endif
Daniel P. Berrangé46859d92020-09-01 14:30:49 +010058