mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
Remove useless diagnostic in MDC verification.
* g10/encr-data.c (decrypt_data): Do not distinguish between a bad MDC packet header and a bad MDC. -- The separate diagnostic was introduced for debugging a problems. For explaining an MDC error a single error message is easier to understand.
This commit is contained in:
parent
ab644b1eff
commit
01bd0558dd
@ -208,12 +208,10 @@ decrypt_data( void *procctx, PKT_encrypted *ed, DEK *dek )
|
|||||||
cipher_decrypt ( dfx->cipher_hd, dfx->defer, dfx->defer, 22);
|
cipher_decrypt ( dfx->cipher_hd, dfx->defer, dfx->defer, 22);
|
||||||
md_write ( dfx->mdc_hash, dfx->defer, 2);
|
md_write ( dfx->mdc_hash, dfx->defer, 2);
|
||||||
md_final ( dfx->mdc_hash );
|
md_final ( dfx->mdc_hash );
|
||||||
if (dfx->defer[0] != '\xd3' || dfx->defer[1] != '\x14' ) {
|
if ( dfx->defer[0] != '\xd3'
|
||||||
log_error("mdc_packet with invalid encoding\n");
|
|| dfx->defer[1] != '\x14'
|
||||||
rc = G10ERR_INVALID_PACKET;
|
|| datalen != 20
|
||||||
}
|
|| memcmp (md_read (dfx->mdc_hash, 0 ), dfx->defer+2, datalen))
|
||||||
else if ( datalen != 20
|
|
||||||
|| memcmp(md_read( dfx->mdc_hash, 0 ), dfx->defer+2, datalen) )
|
|
||||||
rc = G10ERR_BAD_SIGN;
|
rc = G10ERR_BAD_SIGN;
|
||||||
/*log_hexdump("MDC calculated:",md_read( dfx->mdc_hash, 0), datalen);*/
|
/*log_hexdump("MDC calculated:",md_read( dfx->mdc_hash, 0), datalen);*/
|
||||||
/*log_hexdump("MDC message :", dfx->defer, 20);*/
|
/*log_hexdump("MDC message :", dfx->defer, 20);*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user