doc/
2009-05-18 Marcus Brinkmann <marcus@g10code.de> * gpgme.texi (Encrypting a Plaintext): Document GPGME_ENCRYPT_NO_ENCRYPT_TO. src/ 2009-05-18 Marcus Brinkmann <marcus@g10code.de> * gpgme.h.in (gpgme_encrypt_flags_t): Add GPGME_ENCRYPT_NO_ENCRYPT_TO. * engine-gpg.c (gpg_encrypt): Pass --no-encrypt-to to gpg if GPGME_ENCRYPT_NO_ENCRYPT_TO flag is set.
This commit is contained in:
parent
63ebab659e
commit
2c5d801fc4
4
NEWS
4
NEWS
@ -1,6 +1,9 @@
|
||||
Noteworthy changes in version 1.1.9
|
||||
------------------------------------------------
|
||||
|
||||
* New encryption flag GPGME_ENCRYPT_NO_ENCRYPT_TO to disable default
|
||||
recipients.
|
||||
|
||||
* Interface changes relative to the 1.1.7 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GPGME_KEYLIST_MODE_EPHEMERAL NEW.
|
||||
@ -12,6 +15,7 @@ Noteworthy changes in version 1.1.9
|
||||
gpgme_op_assuan_transact NEW.
|
||||
gpgme_op_assuan_result NEW.
|
||||
gpgme_subkey_t EXTENDED: New fields is_cardkey, card_number.
|
||||
GPGME_ENCRYPT_NO_ENCRYPT_TO NEW.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-05-18 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* gpgme.texi (Encrypting a Plaintext): Document
|
||||
GPGME_ENCRYPT_NO_ENCRYPT_TO.
|
||||
|
||||
2009-05-05 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* gpgme.texi (Engine Information): Replace path by file_name.
|
||||
|
@ -4723,6 +4723,12 @@ The @code{GPGME_ENCRYPT_ALWAYS_TRUST} symbol specifies that all the
|
||||
recipients in @var{recp} should be trusted, even if the keys do not
|
||||
have a high enough validity in the keyring. This flag should be used
|
||||
with care; in general it is not a good idea to use any untrusted keys.
|
||||
|
||||
@item GPGME_ENCRYPT_NO_ENCRYPT_TO
|
||||
The @code{GPGME_ENCRYPT_NO_ENCRYPT_TO} symbol specifies that no
|
||||
default or hidden default recipients as configured in the crypto
|
||||
backend should be included. This can be useful for managing different
|
||||
user profiles.
|
||||
@end table
|
||||
|
||||
If @code{GPG_ERR_UNUSABLE_PUBKEY} is returned, some recipients in
|
||||
|
@ -1,3 +1,10 @@
|
||||
2009-05-18 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* gpgme.h.in (gpgme_encrypt_flags_t): Add
|
||||
GPGME_ENCRYPT_NO_ENCRYPT_TO.
|
||||
* engine-gpg.c (gpg_encrypt): Pass --no-encrypt-to to gpg if
|
||||
GPGME_ENCRYPT_NO_ENCRYPT_TO flag is set.
|
||||
|
||||
2009-05-14 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgme.h.in (gpgme_status_code_t): Explicitly initialize for
|
||||
|
@ -1611,9 +1611,12 @@ gpg_encrypt (void *engine, gpgme_key_t recp[], gpgme_encrypt_flags_t flags,
|
||||
{
|
||||
/* If we know that all recipients are valid (full or ultimate trust)
|
||||
we can suppress further checks. */
|
||||
if (!err && !symmetric && (flags & GPGME_ENCRYPT_ALWAYS_TRUST))
|
||||
if (!err && (flags & GPGME_ENCRYPT_ALWAYS_TRUST))
|
||||
err = add_arg (gpg, "--always-trust");
|
||||
|
||||
if (!err && (flags & GPGME_ENCRYPT_NO_ENCRYPT_TO))
|
||||
err = add_arg (gpg, "--no-encrypt-to");
|
||||
|
||||
if (!err)
|
||||
err = append_args_from_recipients (gpg, recp);
|
||||
}
|
||||
|
@ -1349,6 +1349,14 @@ gpgsm_encrypt (void *engine, gpgme_key_t recp[], gpgme_encrypt_flags_t flags,
|
||||
if (!recp)
|
||||
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
|
||||
|
||||
if (flags & GPGME_ENCRYPT_NO_ENCRYPT_TO)
|
||||
{
|
||||
err = gpgsm_assuan_simple_command (gpgsm->assuan_ctx,
|
||||
"OPTION no-encrypt-to", NULL, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
gpgsm->input_cb.data = plain;
|
||||
err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data));
|
||||
if (err)
|
||||
|
@ -1168,7 +1168,8 @@ gpgme_encrypt_result_t gpgme_op_encrypt_result (gpgme_ctx_t ctx);
|
||||
/* The valid encryption flags. */
|
||||
typedef enum
|
||||
{
|
||||
GPGME_ENCRYPT_ALWAYS_TRUST = 1
|
||||
GPGME_ENCRYPT_ALWAYS_TRUST = 1,
|
||||
GPGME_ENCRYPT_NO_ENCRYPT_TO = 2
|
||||
}
|
||||
gpgme_encrypt_flags_t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user