2019-07-16 17:28:54 +02:00
|
|
|
crypto_ss.add(genh)
|
|
|
|
crypto_ss.add(files(
|
|
|
|
'afsplit.c',
|
2022-05-25 11:01:12 +02:00
|
|
|
'akcipher.c',
|
2019-07-16 17:28:54 +02:00
|
|
|
'block-luks.c',
|
|
|
|
'block-qcow.c',
|
|
|
|
'block.c',
|
|
|
|
'cipher.c',
|
2022-05-25 11:01:13 +02:00
|
|
|
'der.c',
|
2019-07-16 17:28:54 +02:00
|
|
|
'hash.c',
|
|
|
|
'hmac.c',
|
|
|
|
'ivgen-essiv.c',
|
|
|
|
'ivgen-plain.c',
|
|
|
|
'ivgen-plain64.c',
|
|
|
|
'ivgen.c',
|
|
|
|
'pbkdf.c',
|
|
|
|
'secret_common.c',
|
|
|
|
'secret.c',
|
|
|
|
'tlscreds.c',
|
|
|
|
'tlscredsanon.c',
|
|
|
|
'tlscredspsk.c',
|
|
|
|
'tlscredsx509.c',
|
|
|
|
'tlssession.c',
|
2022-05-25 11:01:14 +02:00
|
|
|
'rsakey.c',
|
2019-07-16 17:28:54 +02:00
|
|
|
))
|
|
|
|
|
2021-06-03 11:15:26 +02:00
|
|
|
if nettle.found()
|
|
|
|
crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
|
2022-05-25 11:01:14 +02:00
|
|
|
if hogweed.found()
|
|
|
|
crypto_ss.add(gmp, hogweed)
|
|
|
|
endif
|
2021-07-02 18:00:32 +02:00
|
|
|
if xts == 'private'
|
|
|
|
crypto_ss.add(files('xts.c'))
|
|
|
|
endif
|
2021-06-03 11:15:26 +02:00
|
|
|
elif gcrypt.found()
|
|
|
|
crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c'))
|
2021-06-25 19:32:14 +02:00
|
|
|
elif gnutls_crypto.found()
|
2021-06-25 19:32:14 +02:00
|
|
|
crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c'))
|
2019-07-16 17:28:54 +02:00
|
|
|
else
|
2020-09-01 15:30:49 +02:00
|
|
|
crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
|
2019-07-16 17:28:54 +02:00
|
|
|
endif
|
|
|
|
|
2022-04-20 17:33:42 +02:00
|
|
|
if have_keyring
|
|
|
|
crypto_ss.add(files('secret_keyring.c'))
|
|
|
|
endif
|
2021-11-08 14:02:42 +01:00
|
|
|
if have_afalg
|
|
|
|
crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
|
|
|
|
endif
|
2021-06-03 11:15:26 +02:00
|
|
|
crypto_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c'))
|
2020-09-01 15:30:49 +02:00
|
|
|
|
2022-04-23 04:35:01 +02:00
|
|
|
util_ss.add(files('sm4.c'))
|
2020-08-19 14:44:56 +02:00
|
|
|
util_ss.add(files('aes.c'))
|
|
|
|
util_ss.add(files('init.c'))
|
2021-06-30 18:20:02 +02:00
|
|
|
if gnutls.found()
|
|
|
|
util_ss.add(gnutls)
|
|
|
|
endif
|
2020-09-01 15:30:49 +02:00
|
|
|
|
2021-06-03 11:15:26 +02:00
|
|
|
if gcrypt.found()
|
|
|
|
util_ss.add(gcrypt, files('random-gcrypt.c'))
|
|
|
|
elif gnutls.found()
|
|
|
|
util_ss.add(gnutls, files('random-gnutls.c'))
|
2021-10-13 11:46:09 +02:00
|
|
|
elif get_option('rng_none')
|
2020-08-19 14:44:56 +02:00
|
|
|
util_ss.add(files('random-none.c'))
|
|
|
|
else
|
|
|
|
util_ss.add(files('random-platform.c'))
|
|
|
|
endif
|
2020-09-01 15:30:49 +02:00
|
|
|
|