summaryrefslogtreecommitdiff
path: root/cipher/cipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/cipher.c')
-rw-r--r--cipher/cipher.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cipher/cipher.c b/cipher/cipher.c
index f2558371..72bd9b29 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -785,6 +785,7 @@ cipher_setkey (gcry_cipher_hd_t c, byte *key, size_t keylen)
c->spec->contextsize);
c->marks.key = 1;
+ rc = 0; /* Clear in case of allow_weak_key. */
switch (c->mode)
{
case GCRY_CIPHER_MODE_CMAC: