summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-10-11 15:39:22 +0200
committerWerner Koch <wk@gnupg.org>2013-10-11 15:39:22 +0200
commit6bd5d18c45a4a3ce8f0f66f56c83b80594877f53 (patch)
tree610dd1f7881729aa98ee1795e66303bc8e4ae8ce /tests
parentd0ae6635e4e6ae273c3a137c513d518f28f6eab3 (diff)
downloadlibgcrypt-6bd5d18c45a4a3ce8f0f66f56c83b80594877f53.tar.gz
pubkey: Move sexp parsing for gcry_pk_encrypt to the modules.
* cipher/rsa.c (rsa_encrypt): Revamp. * cipher/elgamal.c (elg_encrypt): Revamp. * cipher/ecc.c (ecc_encrypt_raw): Revamp. * cipher/pubkey.c (gcry_pk_encrypt): Simplify. * tests/basic.c (check_pubkey_crypt): Init plain, ciph, and data so that they are initialized even after an encrypt failure. -- Note that we do not have a regression test for ecc_encrypt_raw. Thus it is possible that a bug has been introduced. Should be tested using GnuPG master. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/basic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/basic.c b/tests/basic.c
index 13a8600b..ee049006 100644
--- a/tests/basic.c
+++ b/tests/basic.c
@@ -3486,7 +3486,9 @@ static void
check_pubkey_crypt (int n, gcry_sexp_t skey, gcry_sexp_t pkey, int algo)
{
gcry_error_t rc;
- gcry_sexp_t plain, ciph, data;
+ gcry_sexp_t plain = NULL;
+ gcry_sexp_t ciph = NULL;
+ gcry_sexp_t data = NULL;
int dataidx;
static struct
{