pubkey: Move sexp parsing for gcry_pk_encrypt to the modules.
authorWerner Koch <wk@gnupg.org>
Fri, 11 Oct 2013 13:39:22 +0000 (15:39 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 11 Oct 2013 13:39:22 +0000 (15:39 +0200)
commit6bd5d18c45a4a3ce8f0f66f56c83b80594877f53
tree610dd1f7881729aa98ee1795e66303bc8e4ae8ce
parentd0ae6635e4e6ae273c3a137c513d518f28f6eab3
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>
cipher/ecc.c
cipher/elgamal.c
cipher/pubkey.c
cipher/rsa.c
src/cipher-proto.h
tests/basic.c