1 crypto_ss = ss.source_set()
26 if 'CONFIG_NETTLE' in config_host
27 crypto_ss.add(files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
28 elif 'CONFIG_GCRYPT' in config_host
29 crypto_ss.add(files('hash-gcrypt.c', 'pbkdf-gcrypt.c'))
30 if 'CONFIG_GCRYPT_HMAC' in config_host
31 crypto_ss.add(files('hmac-gcrypt.c'))
33 crypto_ss.add(files('hmac-glib.c'))
36 crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
39 crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyring.c'))
40 crypto_ss.add(when: 'CONFIG_QEMU_PRIVATE_XTS', if_true: files('xts.c'))
41 crypto_ss.add(when: 'CONFIG_AF_ALG', if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
42 crypto_ss.add(when: 'CONFIG_GNUTLS', if_true: files('tls-cipher-suites.c'))
44 if 'CONFIG_NETTLE' in config_host
46 elif 'CONFIG_GCRYPT' in config_host
50 if 'CONFIG_GNUTLS' in config_host
55 crypto_ss = crypto_ss.apply(config_host, strict: false)
56 libcrypto = static_library('crypto', crypto_ss.sources() + genh,
57 dependencies: [crypto_ss.dependencies()],
59 build_by_default: false)
61 crypto = declare_dependency(link_whole: libcrypto,
62 dependencies: [authz, qom])
64 util_ss.add(files('aes.c'))
65 util_ss.add(files('init.c'))
67 if 'CONFIG_GCRYPT' in config_host
68 util_ss.add(files('random-gcrypt.c'))
69 elif 'CONFIG_GNUTLS' in config_host
70 util_ss.add(files('random-gnutls.c'))
71 elif 'CONFIG_RNG_NONE' in config_host
72 util_ss.add(files('random-none.c'))
74 util_ss.add(files('random-platform.c'))
77 if 'CONFIG_GCRYPT' in config_host
81 if 'CONFIG_GNUTLS' in config_host