core: Fix passphrase cb for mixed sym encrypt
* src/encrypt.c (encrypt_start): Handle SYMMETRIC flag. * src/encrypt-sign.c (encrypt_sign_start): Ditto. -- This causes the passphrace command handler to be properly registered which in turn will result in the passphrase callback beeing called.
This commit is contained in:
parent
ab3fbdbd05
commit
efe7e11dfa
@ -72,7 +72,7 @@ encrypt_sign_start (gpgme_ctx_t ctx, int synchronous, gpgme_key_t recp[],
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
symmetric = !recp;
|
symmetric = !recp || (flags & GPGME_ENCRYPT_SYMMETRIC);
|
||||||
|
|
||||||
if (!plain)
|
if (!plain)
|
||||||
return gpg_error (GPG_ERR_NO_DATA);
|
return gpg_error (GPG_ERR_NO_DATA);
|
||||||
|
@ -228,8 +228,7 @@ encrypt_start (gpgme_ctx_t ctx, int synchronous, gpgme_key_t recp[],
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (!recp)
|
symmetric = !recp || (flags & GPGME_ENCRYPT_SYMMETRIC);
|
||||||
symmetric = 1;
|
|
||||||
|
|
||||||
if (!plain)
|
if (!plain)
|
||||||
return gpg_error (GPG_ERR_NO_DATA);
|
return gpg_error (GPG_ERR_NO_DATA);
|
||||||
|
Loading…
Reference in New Issue
Block a user