aboutsummaryrefslogtreecommitdiffstats
path: root/g10/mainproc.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-08-06 17:57:53 +0000
committerDavid Shaw <[email protected]>2002-08-06 17:57:53 +0000
commit63a71c1ff9f016c925740e96733c15bcd006b475 (patch)
tree1aff4d9f8cd162774fbb93b518410d81f10c4c76 /g10/mainproc.c
parent* encode.c (encode_crypt), g10.c (main), sign.c (sign_file, (diff)
downloadgnupg-63a71c1ff9f016c925740e96733c15bcd006b475.tar.gz
gnupg-63a71c1ff9f016c925740e96733c15bcd006b475.zip
* options.h, g10.c (main), mainproc.c (proc_encrypted): --ignore-mdc-error
option to turn a MDC check error into a warning.
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r--g10/mainproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 2004da1c7..38aaac0d9 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -492,11 +492,11 @@ proc_encrypted( CTX c, PACKET *pkt )
m_free(c->dek); c->dek = NULL;
if( result == -1 )
;
- else if( !result ) {
+ else if( !result || (result==G10ERR_BAD_SIGN && opt.ignore_mdc_error)) {
write_status( STATUS_DECRYPTION_OKAY );
if( opt.verbose > 1 )
log_info(_("decryption okay\n"));
- if( pkt->pkt.encrypted->mdc_method )
+ if( pkt->pkt.encrypted->mdc_method && !result )
write_status( STATUS_GOODMDC );
else if(!opt.no_mdc_warn)
log_info ("WARNING: message was not integrity protected\n");