diff options
author | Werner Koch <wk@gnupg.org> | 2003-06-13 11:38:22 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-06-13 11:38:22 +0000 |
commit | 5e61bedf08edab25506d605a4e688eabdf298ed9 (patch) | |
tree | 9497b0337790128d5dfeab390ee3307737fa870f /cipher/cipher.c | |
parent | 250f52743a4aad2d50f212899a164287bc56385e (diff) | |
download | libgcrypt-5e61bedf08edab25506d605a4e688eabdf298ed9.tar.gz |
* gcrypt.h (gcry_md_get_algo): Reverted to old API. This is a
convenience function anyway and error checking is not approriate.
(gcry_md_is_enabled): New.
(gcry_md_is_secure): Replaced macro by function and reverted to old
API.
Diffstat (limited to 'cipher/cipher.c')
-rw-r--r-- | cipher/cipher.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cipher/cipher.c b/cipher/cipher.c index 4221a79e..b69e35ea 100644 --- a/cipher/cipher.c +++ b/cipher/cipher.c @@ -512,10 +512,9 @@ cipher_get_blocksize (int id) /**************** - * Open a cipher handle for use with algorithm ALGO, in mode MODE - * and return the handle. Return NULL and set the internal error variable - * if something goes wrong. - */ + * Open a cipher handle for use with algorithm ALGO, in mode MODE and + * return the handle. Put NULL into HANDLER and return and error code + * if something goes wrong. */ gpg_error_t gcry_cipher_open (gcry_cipher_hd_t *handle, @@ -627,8 +626,8 @@ gcry_cipher_open (gcry_cipher_hd_t *handle, ath_mutex_unlock (&ciphers_registered_lock); } } - else - *handle = h; + + *handle = err ? NULL : h; return gpg_error (err); } |