1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-13 22:21:09 +02:00

* encr-data.c (decrypt_data): Give a warning with a weak key, but still

allow to decrypt the message.
This commit is contained in:
David Shaw 2004-10-08 21:54:26 +00:00
parent 4737923d56
commit fa012921b2
2 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2004-10-08 David Shaw <dshaw@jabberwocky.com>
* encr-data.c (decrypt_data): Give a warning with a weak key, but
still allow to decrypt the message.
2004-10-07 David Shaw <dshaw@jabberwocky.com> 2004-10-07 David Shaw <dshaw@jabberwocky.com>
* pkclist.c (build_pk_list): Keystrify. * pkclist.c (build_pk_list): Keystrify.

View File

@ -85,15 +85,20 @@ decrypt_data( void *procctx, PKT_encrypted *ed, DEK *dek )
dfx.cipher_hd = cipher_open( dek->algo, dfx.cipher_hd = cipher_open( dek->algo,
ed->mdc_method? CIPHER_MODE_CFB ed->mdc_method? CIPHER_MODE_CFB
: CIPHER_MODE_AUTO_CFB, 1 ); : 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 ); rc = cipher_setkey( dfx.cipher_hd, dek->key, dek->keylen );
if( rc == G10ERR_WEAK_KEY ) if( rc == G10ERR_WEAK_KEY )
log_info(_("WARNING: message was encrypted with " {
"a weak key in the symmetric cipher.\n")); log_info(_("WARNING: message was encrypted with"
else if( rc ) { " a weak key in the symmetric cipher.\n"));
rc=0;
}
else if( rc )
{
log_error("key setup failed: %s\n", g10_errstr(rc) ); log_error("key setup failed: %s\n", g10_errstr(rc) );
goto leave; goto leave;
}
}
if (!ed->buf) { if (!ed->buf) {
log_error(_("problem handling encrypted packet\n")); log_error(_("problem handling encrypted packet\n"));
goto leave; goto leave;