summaryrefslogtreecommitdiff
path: root/src
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 /src
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 'src')
-rw-r--r--src/cipher-proto.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cipher-proto.h b/src/cipher-proto.h
index 8892ddfe..c570e5ff 100644
--- a/src/cipher-proto.h
+++ b/src/cipher-proto.h
@@ -58,11 +58,9 @@ typedef gcry_err_code_t (*gcry_pk_check_secret_key_t) (int algo,
gcry_mpi_t *skey);
/* Type for the pk_encrypt function. */
-typedef gcry_err_code_t (*gcry_pk_encrypt_t) (int algo,
- gcry_sexp_t *r_result,
- gcry_mpi_t data,
- gcry_mpi_t *pkey,
- int flags);
+typedef gcry_err_code_t (*gcry_pk_encrypt_t) (gcry_sexp_t *r_ciph,
+ gcry_sexp_t s_data,
+ gcry_sexp_t keyparms);
/* Type for the pk_decrypt function. */
typedef gcry_err_code_t (*gcry_pk_decrypt_t) (int algo,