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