[svn] gpgme - r1368 - in trunk: . doc src

svn author marcus cvs at cvs.gnupg.org
Mon May 18 19:38:34 CEST 2009


Author: marcus
Date: 2009-05-18 19:38:31 +0200 (Mon, 18 May 2009)
New Revision: 1368

Modified:
   trunk/NEWS
   trunk/doc/ChangeLog
   trunk/doc/gpgme.texi
   trunk/src/ChangeLog
   trunk/src/engine-gpg.c
   trunk/src/engine-gpgsm.c
   trunk/src/gpgme.h.in
Log:
doc/
2009-05-18  Marcus Brinkmann  <marcus at g10code.de>

        * gpgme.texi (Encrypting a Plaintext): Document                                             
        GPGME_ENCRYPT_NO_ENCRYPT_TO.                                                                
                                                                                                    
src/                                                                                                
2009-05-18  Marcus Brinkmann  <marcus at 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.                                                    




Modified: trunk/doc/ChangeLog
===================================================================
--- trunk/doc/ChangeLog	2009-05-14 07:40:51 UTC (rev 1367)
+++ trunk/doc/ChangeLog	2009-05-18 17:38:31 UTC (rev 1368)
@@ -1,3 +1,8 @@
+2009-05-18  Marcus Brinkmann  <marcus at g10code.de>
+
+	* gpgme.texi (Encrypting a Plaintext): Document
+	GPGME_ENCRYPT_NO_ENCRYPT_TO.
+
 2009-05-05  Marcus Brinkmann  <marcus at g10code.de>
 
 	* gpgme.texi (Engine Information): Replace path by file_name.

Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2009-05-14 07:40:51 UTC (rev 1367)
+++ trunk/src/ChangeLog	2009-05-18 17:38:31 UTC (rev 1368)
@@ -1,3 +1,10 @@
+2009-05-18  Marcus Brinkmann  <marcus at 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 at g10code.com>
 
 	* gpgme.h.in (gpgme_status_code_t): Explicitly initialize for

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2009-05-14 07:40:51 UTC (rev 1367)
+++ trunk/NEWS	2009-05-18 17:38:31 UTC (rev 1368)
@@ -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 @@
  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.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 

Modified: trunk/doc/gpgme.texi
===================================================================
--- trunk/doc/gpgme.texi	2009-05-14 07:40:51 UTC (rev 1367)
+++ trunk/doc/gpgme.texi	2009-05-18 17:38:31 UTC (rev 1368)
@@ -4723,6 +4723,12 @@
 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.
+
+ at 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

Modified: trunk/src/engine-gpg.c
===================================================================
--- trunk/src/engine-gpg.c	2009-05-14 07:40:51 UTC (rev 1367)
+++ trunk/src/engine-gpg.c	2009-05-18 17:38:31 UTC (rev 1368)
@@ -1611,9 +1611,12 @@
     {
       /* 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);
     }

Modified: trunk/src/engine-gpgsm.c
===================================================================
--- trunk/src/engine-gpgsm.c	2009-05-14 07:40:51 UTC (rev 1367)
+++ trunk/src/engine-gpgsm.c	2009-05-18 17:38:31 UTC (rev 1368)
@@ -1349,6 +1349,14 @@
   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)

Modified: trunk/src/gpgme.h.in
===================================================================
--- trunk/src/gpgme.h.in	2009-05-14 07:40:51 UTC (rev 1367)
+++ trunk/src/gpgme.h.in	2009-05-18 17:38:31 UTC (rev 1368)
@@ -1168,7 +1168,8 @@
 /* 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;
 




More information about the Gnupg-commits mailing list