diff options
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r-- | g10/mainproc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c index 70a50c615..cae7ddda8 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -274,6 +274,7 @@ proc_plaintext( CTX c, PACKET *pkt ) * textmode filter (sigclass 0x01) */ c->mfx.md = md_open( DIGEST_ALGO_RMD160, 0); + md_enable( c->mfx.md, DIGEST_ALGO_MD5 ); rc = handle_plaintext( pt, &c->mfx ); if( rc ) log_error( "handle plaintext failed: %s\n", g10_errstr(rc)); @@ -325,6 +326,11 @@ do_check_sig( CTX c, KBNODE node ) if( sig->sig_class == 0x00 ) { md = md_copy( c->mfx.md ); } + else if( sig->sig_class == 0x01 ) { + /* how do we know that we have to hash the (already hashed) text + * in canonical mode ??? (calculating both modes???) */ + md = md_copy( c->mfx.md ); + } else if( (sig->sig_class&~3) == 0x10 ) { /* classes 0x10 .. 0x13 */ if( c->cert->pkt->pkttype == PKT_PUBLIC_CERT ) { KBNODE n1 = find_kbparent( c->cert, node ); |