* cipher.c (gcry_cipher_encrypt): Reworked so that the output will
authorWerner Koch <wk@gnupg.org>
Fri, 17 Jan 2003 16:42:23 +0000 (16:42 +0000)
committerWerner Koch <wk@gnupg.org>
Fri, 17 Jan 2003 16:42:23 +0000 (16:42 +0000)
commit86d60c15b97ab30b941731a70864e96403b77ec9
tree6a1040f9d7a226df25bcf9dcc81ac6ff8a25ccd2
parent9b8117f58f1bc0365ab13f7d26fdb41cb2414005
* cipher.c (gcry_cipher_encrypt): Reworked so that the output will
never contain the plaintext even if the caller did not checked the
return value.

* md.c (gcry_md_get_algo): Changed error code to GCRYERR_GENERAL
because we don't have an invalid md algo but no algorithm enabled.

* pubkey.c (gcry_pk_genkey): Changed error code for bounds check
of table parameters to GCRYERR_INTERNAL.

* md.c (gcry_md_open): Partly reverted Timo's change from
2002-10-10 by removing the check for the algorithm.  An algorithm
of 0 is allowed and anyway we should not double check it or check
it using a different function.  Also fixed the flags check.

* pubkey.c (gcry_pk_encrypt): Make sure that R_CIPH points to NULL
on error.
(gcry_pk_decrypt): Ditto for R_PLAIN.
(gcry_pk_sign): Ditto for R_SIG.
(gcry_pk_genkey): Ditto for R_KEY.
cipher/ChangeLog
cipher/cipher.c
cipher/md.c
cipher/pubkey.c