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 */)
|
||||
{
|
||||
engine_gpg_t gpg = engine;
|
||||
gpgme_error_t err;
|
||||
int symmetric = !recp;
|
||||
gpgme_error_t err = 0;
|
||||
|
||||
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)
|
||||
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"))
|
||||
err = add_arg (gpg, "--mimemode");
|
||||
|
||||
if (!symmetric)
|
||||
if (recp)
|
||||
{
|
||||
/* If we know that all recipients are valid (full or ultimate trust)
|
||||
we can suppress further checks. */
|
||||
|
Loading…
Reference in New Issue
Block a user