Disallow encryption/decryption if key is not set
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Thu, 30 Jun 2016 18:51:50 +0000 (21:51 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Thu, 30 Jun 2016 20:33:12 +0000 (23:33 +0300)
commit07de9858032826f5a7b08c372f6bcc73bbb503eb
tree20ff9b424ca038041c68bd984c9778ad933021df
parenta6158a01a4d81a5d862e1e0a60bfd6063443311d
Disallow encryption/decryption if key is not set

* cipher/cipher.c (cipher_encrypt, cipher_decrypt): If mode is not
NONE, make sure that key is set.
* cipher/cipher-ccm.c (_gcry_cipher_ccm_set_nonce): Do not clear
'marks.key' when reseting state.
--

Reported-by: Andreas Metzler <ametzler@bebt.de>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/cipher-ccm.c
cipher/cipher.c