diff options
author | Werner Koch <wk@gnupg.org> | 1998-09-18 17:24:53 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-09-18 17:24:53 +0200 |
commit | b4aeef458c51b9debd394592e76b93cc6b00e0a2 (patch) | |
tree | e87818f5c15e12189f5fc054faf6d09e07e3d120 /g10/encr-data.c | |
parent | Michael Roth has released is des impl. (diff) | |
download | gnupg2-b4aeef458c51b9debd394592e76b93cc6b00e0a2.tar.xz gnupg2-b4aeef458c51b9debd394592e76b93cc6b00e0a2.zip |
.
Diffstat (limited to 'g10/encr-data.c')
-rw-r--r-- | g10/encr-data.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/encr-data.c b/g10/encr-data.c index 03551be7b..c9fca4d81 100644 --- a/g10/encr-data.c +++ b/g10/encr-data.c @@ -69,9 +69,12 @@ decrypt_data( PKT_encrypted *ed, DEK *dek ) log_bug("Nanu\n"); /* oops: found a bug */ dfx.cipher_hd = cipher_open( dek->algo, CIPHER_MODE_AUTO_CFB, 1 ); - if( cipher_setkey( dfx.cipher_hd, dek->key, dek->keylen ) ) + rc = cipher_setkey( dfx.cipher_hd, dek->key, dek->keylen ); + if( rc == G10ERR_WEAK_KEY ) log_info(_("Warning: Message was encrypted with " "a weak key in the symmetric cipher.\n")); + else if( rc ) + log_error("key setup failed: %s\n", g10_errstr(rc) ); cipher_setiv( dfx.cipher_hd, NULL ); |