diff options
author | David Shaw <[email protected]> | 2002-08-06 17:57:53 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-08-06 17:57:53 +0000 |
commit | 63a71c1ff9f016c925740e96733c15bcd006b475 (patch) | |
tree | 1aff4d9f8cd162774fbb93b518410d81f10c4c76 /g10/mainproc.c | |
parent | * encode.c (encode_crypt), g10.c (main), sign.c (sign_file, (diff) | |
download | gnupg-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.c | 4 |
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"); |