Marc-André Lureau | 5582c58 | 2019-07-16 19:28:54 +0400 | [diff] [blame] | 1 | crypto_ss.add(genh) |
| 2 | crypto_ss.add(files( |
| 3 | 'afsplit.c', |
| 4 | 'block-luks.c', |
| 5 | 'block-qcow.c', |
| 6 | 'block.c', |
| 7 | 'cipher.c', |
Marc-André Lureau | 5582c58 | 2019-07-16 19:28:54 +0400 | [diff] [blame] | 8 | '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 Bonzini | 5761251 | 2021-06-03 11:15:26 +0200 | [diff] [blame] | 24 | if nettle.found() |
| 25 | crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c')) |
Daniel P. Berrangé | 6801404 | 2021-07-02 17:00:32 +0100 | [diff] [blame] | 26 | if xts == 'private' |
| 27 | crypto_ss.add(files('xts.c')) |
| 28 | endif |
Paolo Bonzini | 5761251 | 2021-06-03 11:15:26 +0200 | [diff] [blame] | 29 | elif gcrypt.found() |
| 30 | crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c')) |
Daniel P. Berrangé | 9a85ca0 | 2021-06-25 18:32:14 +0100 | [diff] [blame] | 31 | elif gnutls_crypto.found() |
Daniel P. Berrangé | 8c1d3dc | 2021-06-25 18:32:14 +0100 | [diff] [blame] | 32 | crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c')) |
Marc-André Lureau | 5582c58 | 2019-07-16 19:28:54 +0400 | [diff] [blame] | 33 | else |
Daniel P. Berrangé | 46859d9 | 2020-09-01 14:30:49 +0100 | [diff] [blame] | 34 | crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c')) |
Marc-André Lureau | 5582c58 | 2019-07-16 19:28:54 +0400 | [diff] [blame] | 35 | endif |
Marc-André Lureau | 5582c58 | 2019-07-16 19:28:54 +0400 | [diff] [blame] | 36 | |
| 37 | crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyring.c')) |
Paolo Bonzini | 34b5261 | 2021-11-08 14:02:42 +0100 | [diff] [blame] | 38 | if have_afalg |
| 39 | crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c')) |
| 40 | endif |
Paolo Bonzini | 5761251 | 2021-06-03 11:15:26 +0200 | [diff] [blame] | 41 | crypto_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c')) |
Daniel P. Berrangé | 46859d9 | 2020-09-01 14:30:49 +0100 | [diff] [blame] | 42 | |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 43 | util_ss.add(files('aes.c')) |
| 44 | util_ss.add(files('init.c')) |
Daniel P. Berrangé | cc4c7c7 | 2021-06-30 17:20:02 +0100 | [diff] [blame] | 45 | if gnutls.found() |
| 46 | util_ss.add(gnutls) |
| 47 | endif |
Daniel P. Berrangé | 46859d9 | 2020-09-01 14:30:49 +0100 | [diff] [blame] | 48 | |
Paolo Bonzini | 5761251 | 2021-06-03 11:15:26 +0200 | [diff] [blame] | 49 | if gcrypt.found() |
| 50 | util_ss.add(gcrypt, files('random-gcrypt.c')) |
| 51 | elif gnutls.found() |
| 52 | util_ss.add(gnutls, files('random-gnutls.c')) |
Paolo Bonzini | c55cf6a | 2021-10-13 11:46:09 +0200 | [diff] [blame] | 53 | elif get_option('rng_none') |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 54 | util_ss.add(files('random-none.c')) |
| 55 | else |
| 56 | util_ss.add(files('random-platform.c')) |
| 57 | endif |
Daniel P. Berrangé | 46859d9 | 2020-09-01 14:30:49 +0100 | [diff] [blame] | 58 | |