aboutsummaryrefslogtreecommitdiff
path: root/crypto/akcipher.c
diff options
context:
space:
mode:
authorLei He <helei.sig11@bytedance.com>2022-05-25 17:01:15 +0800
committerDaniel P. Berrangé <berrange@redhat.com>2022-05-26 11:41:53 +0100
commite09d1c274782e30dcc0ab5e4d62b624d0028d718 (patch)
tree7207e2117335a5f9d9f0433f966349d8d981bf6c /crypto/akcipher.c
parent4c5e512ee0c49efb42286600aef31739c0dcee5d (diff)
downloadqemu-e09d1c274782e30dcc0ab5e4d62b624d0028d718.zip
qemu-e09d1c274782e30dcc0ab5e4d62b624d0028d718.tar.gz
qemu-e09d1c274782e30dcc0ab5e4d62b624d0028d718.tar.bz2
crypto: Implement RSA algorithm by gcrypt
Added gcryt implementation of RSA algorithm, RSA algorithm implemented by gcrypt has a higher priority than nettle because it supports raw padding. Signed-off-by: lei he <helei.sig11@bytedance.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'crypto/akcipher.c')
-rw-r--r--crypto/akcipher.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/akcipher.c b/crypto/akcipher.c
index f287083..ad88379 100644
--- a/crypto/akcipher.c
+++ b/crypto/akcipher.c
@@ -23,7 +23,9 @@
#include "crypto/akcipher.h"
#include "akcipherpriv.h"
-#if defined(CONFIG_NETTLE) && defined(CONFIG_HOGWEED)
+#if defined(CONFIG_GCRYPT)
+#include "akcipher-gcrypt.c.inc"
+#elif defined(CONFIG_NETTLE) && defined(CONFIG_HOGWEED)
#include "akcipher-nettle.c.inc"
#else
QCryptoAkCipher *qcrypto_akcipher_new(const QCryptoAkCipherOptions *opts,