diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-20 14:46:19 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-20 14:46:19 +0100 |
| commit | da158a86c407fa7b9da848b571356a26809d8df9 (patch) | |
| tree | 7eed17b46e5b626df8c96a5897129d73c57b4b52 /crypto/init.c | |
| parent | 1b0d3845b454eaaac0b2064c78926ca4d739a080 (diff) | |
| parent | 373166636b9f07c60d7c32610bd346acf7d143e9 (diff) | |
| download | focaccia-qemu-da158a86c407fa7b9da848b571356a26809d8df9.tar.gz focaccia-qemu-da158a86c407fa7b9da848b571356a26809d8df9.zip | |
Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2016-10-20-1' into staging
Merge qcrypto 2016/10/20 v1 # gpg: Signature made Thu 20 Oct 2016 12:58:41 BST # gpg: using RSA key 0xBE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange/tags/pull-qcrypto-2016-10-20-1: crypto: fix initialization of gcrypt threading crypto: fix initialization of crypto in tests qtest: fix make check complaint in crypto module crypto: add mode check in qcrypto_cipher_new() for cipher-builtin crypto: add CTR mode support crypto: extend mode as a parameter in qcrypto_cipher_supports() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'crypto/init.c')
| -rw-r--r-- | crypto/init.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/init.c b/crypto/init.c index 16e099b489..f65207e57d 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -119,6 +119,10 @@ static struct gcry_thread_cbs qcrypto_gcrypt_thread_impl = { int qcrypto_init(Error **errp) { +#ifdef QCRYPTO_INIT_GCRYPT_THREADS + gcry_control(GCRYCTL_SET_THREAD_CBS, &qcrypto_gcrypt_thread_impl); +#endif /* QCRYPTO_INIT_GCRYPT_THREADS */ + #ifdef CONFIG_GNUTLS int ret; ret = gnutls_global_init(); @@ -139,9 +143,6 @@ int qcrypto_init(Error **errp) error_setg(errp, "Unable to initialize gcrypt"); return -1; } -#ifdef QCRYPTO_INIT_GCRYPT_THREADS - gcry_control(GCRYCTL_SET_THREAD_CBS, &qcrypto_gcrypt_thread_impl); -#endif /* QCRYPTO_INIT_GCRYPT_THREADS */ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); #endif |