core: Handle ENCRYPT_SYMMETRIC also for sig & enc
* src/engine-gpg.c (gpg_encrypt_sign): Handle ENCRYPT_SYMMETRIC flag.
This commit is contained in:
parent
d467018ce3
commit
b602d8bc7b
@ -1782,10 +1782,13 @@ gpg_encrypt_sign (void *engine, gpgme_key_t recp[],
|
|||||||
gpgme_ctx_t ctx /* FIXME */)
|
gpgme_ctx_t ctx /* FIXME */)
|
||||||
{
|
{
|
||||||
engine_gpg_t gpg = engine;
|
engine_gpg_t gpg = engine;
|
||||||
gpgme_error_t err;
|
gpgme_error_t err = 0;
|
||||||
int symmetric = !recp;
|
|
||||||
|
|
||||||
err = add_arg (gpg, symmetric ? "--symmetric" : "--encrypt");
|
if (recp)
|
||||||
|
err = add_arg (gpg, "--encrypt");
|
||||||
|
|
||||||
|
if (!err && ((flags & GPGME_ENCRYPT_SYMMETRIC) || !recp))
|
||||||
|
err = add_arg (gpg, "--symmetric");
|
||||||
|
|
||||||
if (!err)
|
if (!err)
|
||||||
err = add_arg (gpg, "--sign");
|
err = add_arg (gpg, "--sign");
|
||||||
@ -1799,7 +1802,7 @@ gpg_encrypt_sign (void *engine, gpgme_key_t recp[],
|
|||||||
&& have_gpg_version (gpg, "2.1.14"))
|
&& have_gpg_version (gpg, "2.1.14"))
|
||||||
err = add_arg (gpg, "--mimemode");
|
err = add_arg (gpg, "--mimemode");
|
||||||
|
|
||||||
if (!symmetric)
|
if (recp)
|
||||||
{
|
{
|
||||||
/* If we know that all recipients are valid (full or ultimate trust)
|
/* If we know that all recipients are valid (full or ultimate trust)
|
||||||
we can suppress further checks. */
|
we can suppress further checks. */
|
||||||
|
Loading…
Reference in New Issue
Block a user