From: Werner Koch Date: Wed, 6 Mar 2002 17:23:17 +0000 (+0000) Subject: * gpgmeplug.c (signMessage): Fixed offbyone. Don't include the X-Git-Tag: gpgme-1.2.0@1385~1050 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0e6eebe38d91dfc65bb04dae79afaeb7012b65bc;p=gpgme.git * gpgmeplug.c (signMessage): Fixed offbyone. Don't include the EOS character into the signature. (checkMessageSignature): Ditto. --- diff --git a/trunk/gpgmeplug/ChangeLog b/trunk/gpgmeplug/ChangeLog index 220dea9..8307049 100644 --- a/trunk/gpgmeplug/ChangeLog +++ b/trunk/gpgmeplug/ChangeLog @@ -1,3 +1,9 @@ +2002-03-06 Werner Koch + + * gpgmeplug.c (signMessage): Fixed offbyone. Don't include the + EOS character into the signature. + (checkMessageSignature): Ditto. + 2002-02-28 Kalle Dalheimer * gpgmeplug.c (signMessage): Implemented warning when signature diff --git a/trunk/gpgmeplug/gpgmeplug.c b/trunk/gpgmeplug/gpgmeplug.c index d9d8ea1..403df1d 100644 --- a/trunk/gpgmeplug/gpgmeplug.c +++ b/trunk/gpgmeplug/gpgmeplug.c @@ -870,7 +870,7 @@ bool signMessage( const char* cleartext, //gpgme_set_signature_algorithm( ctx, config.signatureAlgorithm ); gpgme_data_new_from_mem (&data, cleartext, - 1+strlen( cleartext ), 1 ); + strlen( cleartext ), 1 ); gpgme_data_new ( &sig ); err = gpgme_op_sign (ctx, data, sig, GPGME_SIG_MODE_DETACH ); @@ -993,13 +993,13 @@ bool checkMessageSignature( const char* ciphertext, // gpgme_set_textmode (ctx, signatureIsBinary ? 0 : 1); gpgme_data_new_from_mem( &datapart, ciphertext, - 1+strlen( ciphertext ), 1 ); + strlen( ciphertext ), 1 ); gpgme_data_new_from_mem( &sigpart, signaturetext, signatureIsBinary ? signatureLen - : (1+strlen( signaturetext )), + : strlen( signaturetext ), 1 ); gpgme_op_verify( ctx, sigpart, datapart, &status );