aboutsummaryrefslogtreecommitdiffstats
path: root/g10/encr-data.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-10-08 21:54:26 +0000
committerDavid Shaw <[email protected]>2004-10-08 21:54:26 +0000
commitfa012921b2d4dfa2af2a997bab2b0a377bacdc7c (patch)
tree009b43e209500690f5db9622b1c933de44fd9972 /g10/encr-data.c
parent* pkclist.c (build_pk_list): Keystrify. (diff)
downloadgnupg-fa012921b2d4dfa2af2a997bab2b0a377bacdc7c.tar.gz
gnupg-fa012921b2d4dfa2af2a997bab2b0a377bacdc7c.zip
* encr-data.c (decrypt_data): Give a warning with a weak key, but still
allow to decrypt the message.
Diffstat (limited to '')
-rw-r--r--g10/encr-data.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/g10/encr-data.c b/g10/encr-data.c
index c8a8c85db..e05994535 100644
--- a/g10/encr-data.c
+++ b/g10/encr-data.c
@@ -85,15 +85,20 @@ decrypt_data( void *procctx, PKT_encrypted *ed, DEK *dek )
dfx.cipher_hd = cipher_open( dek->algo,
ed->mdc_method? CIPHER_MODE_CFB
: CIPHER_MODE_AUTO_CFB, 1 );
-/* log_hexdump( "thekey", dek->key, dek->keylen );*/
+ /* log_hexdump( "thekey", 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_info(_("WARNING: message was encrypted with"
+ " a weak key in the symmetric cipher.\n"));
+ rc=0;
+ }
+ else if( rc )
+ {
log_error("key setup failed: %s\n", g10_errstr(rc) );
goto leave;
- }
+
+}
if (!ed->buf) {
log_error(_("problem handling encrypted packet\n"));
goto leave;