* gpgmeplug.c (signMessage): Fixed offbyone. Don't include the
authorWerner Koch <wk@gnupg.org>
Wed, 6 Mar 2002 17:23:17 +0000 (17:23 +0000)
committerWerner Koch <wk@gnupg.org>
Wed, 6 Mar 2002 17:23:17 +0000 (17:23 +0000)
EOS character into the signature.
(checkMessageSignature): Ditto.

trunk/gpgmeplug/ChangeLog
trunk/gpgmeplug/gpgmeplug.c

index 220dea9666295c33d887e476fa5e15a5b08316e9..8307049523fd4e653584bc1c2a643047b9707810 100644 (file)
@@ -1,3 +1,9 @@
+2002-03-06  Werner Koch  <wk@gnupg.org>
+
+       * gpgmeplug.c (signMessage): Fixed offbyone.  Don't include the
+       EOS character into the signature.
+       (checkMessageSignature): Ditto.
+
 2002-02-28  Kalle Dalheimer  <kalle@klaralvdalens-datakonsult.se>
 
        * gpgmeplug.c (signMessage): Implemented warning when signature
index d9d8ea1f2505f2f053d3636e3036a1ce850e0503..403df1d38d021ea899d4b5eb1d86b4b5458489ed 100644 (file)
@@ -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 );