From: Karl-Heinz Zimmer Date: Fri, 22 Mar 2002 17:06:43 +0000 (+0000) Subject: bugfix on new binary-encrypting/signing code X-Git-Tag: gpgme-1.2.0@1385~1034 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5e7eb29aec54298a69e9c23a5ab33046fe293c04;p=gpgme.git bugfix on new binary-encrypting/signing code --- diff --git a/trunk/gpgmeplug/gpgmeplug.c b/trunk/gpgmeplug/gpgmeplug.c index 333ddf8..db876d4 100644 --- a/trunk/gpgmeplug/gpgmeplug.c +++ b/trunk/gpgmeplug/gpgmeplug.c @@ -914,8 +914,10 @@ bool signMessage( const char* cleartext, err = gpgme_op_sign (ctx, data, sig, GPGME_SIG_MODE_DETACH ); if (!err) { - if( __GPGMEPLUG_SIGNATURE_CODE_IS_BINARY ) + if( __GPGMEPLUG_SIGNATURE_CODE_IS_BINARY ) { *ciphertext = gpgme_data_release_and_get_mem( sig, (size_t*)cipherLen ); + bOk = true; + } else { rSig = gpgme_data_release_and_get_mem( sig, (size_t*)cipherLen ); *ciphertext = malloc( *cipherLen + 1 ); @@ -1314,8 +1316,10 @@ bool encryptMessage( const char* cleartext, gpgme_data_release (gPlaintext); if( !err ) { - if( __GPGMEPLUG_ENCRYPTED_CODE_IS_BINARY ) + if( __GPGMEPLUG_ENCRYPTED_CODE_IS_BINARY ) { *ciphertext = gpgme_data_release_and_get_mem( gCiphertext, (size_t*)cipherLen ); + bOk = true; + } else { rCiph = gpgme_data_release_and_get_mem( gCiphertext, (size_t*)cipherLen ); *ciphertext = malloc( *cipherLen + 1 );