diff options
author | Karl-Heinz Zimmer <[email protected]> | 2002-03-22 17:06:43 +0000 |
---|---|---|
committer | Karl-Heinz Zimmer <[email protected]> | 2002-03-22 17:06:43 +0000 |
commit | a88628979f473971d84e47292bf20b9a28d0a9be (patch) | |
tree | b96c8af670fce630fa5c995988e7edda31643f32 /gpgmeplug/gpgmeplug.c | |
parent | interface change: signMessage() and encryptMessage() now return an additional... (diff) | |
download | gpgme-a88628979f473971d84e47292bf20b9a28d0a9be.tar.gz gpgme-a88628979f473971d84e47292bf20b9a28d0a9be.zip |
bugfix on new binary-encrypting/signing code
Diffstat (limited to 'gpgmeplug/gpgmeplug.c')
-rw-r--r-- | gpgmeplug/gpgmeplug.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gpgmeplug/gpgmeplug.c b/gpgmeplug/gpgmeplug.c index 333ddf81..db876d4f 100644 --- a/gpgmeplug/gpgmeplug.c +++ b/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 ); |