bugfix on new binary-encrypting/signing code
This commit is contained in:
parent
cf04fed2de
commit
a88628979f
@ -914,8 +914,10 @@ bool signMessage( const char* cleartext,
|
|||||||
err = gpgme_op_sign (ctx, data, sig, GPGME_SIG_MODE_DETACH );
|
err = gpgme_op_sign (ctx, data, sig, GPGME_SIG_MODE_DETACH );
|
||||||
|
|
||||||
if (!err) {
|
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 );
|
*ciphertext = gpgme_data_release_and_get_mem( sig, (size_t*)cipherLen );
|
||||||
|
bOk = true;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
rSig = gpgme_data_release_and_get_mem( sig, (size_t*)cipherLen );
|
rSig = gpgme_data_release_and_get_mem( sig, (size_t*)cipherLen );
|
||||||
*ciphertext = malloc( *cipherLen + 1 );
|
*ciphertext = malloc( *cipherLen + 1 );
|
||||||
@ -1314,8 +1316,10 @@ bool encryptMessage( const char* cleartext,
|
|||||||
gpgme_data_release (gPlaintext);
|
gpgme_data_release (gPlaintext);
|
||||||
|
|
||||||
if( !err ) {
|
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 );
|
*ciphertext = gpgme_data_release_and_get_mem( gCiphertext, (size_t*)cipherLen );
|
||||||
|
bOk = true;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
rCiph = gpgme_data_release_and_get_mem( gCiphertext, (size_t*)cipherLen );
|
rCiph = gpgme_data_release_and_get_mem( gCiphertext, (size_t*)cipherLen );
|
||||||
*ciphertext = malloc( *cipherLen + 1 );
|
*ciphertext = malloc( *cipherLen + 1 );
|
||||||
|
Loading…
Reference in New Issue
Block a user