<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/engine-gpg.c, branch gpgme-1.9.0</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.9.0</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.9.0'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2017-03-24T14:17:23Z</updated>
<entry>
<title>core: New flags GPGME_DECRYPT_UNWRAP and GPGME_ENCRYPT_WRAP.</title>
<updated>2017-03-24T14:17:23Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-03-24T13:36:54Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=6ac1f2cdedb085b4ac9372c1e591497e2e618de4'/>
<id>urn:sha1:6ac1f2cdedb085b4ac9372c1e591497e2e618de4</id>
<content type='text'>
* src/gpgme.h.in (GPGME_ENCRYPT_WRAP): New const.
(gpgme_decrypt_flags_t): New enum.
(GPGME_DECRYPT_VERIFY): New const
(GPGME_DECRYPT_UNWRAP): New const
(gpgme_op_decrypt_ext_start): New func.
(gpgme_op_decrypt_ext): New func.
* src/decrypt-verify.c (gpgme_op_decrypt_ext_start): New.
(gpgme_op_decrypt_ext): New.
(decrypt_verify_start): Add arg FLAGS.  Replace call to
engine_op_decrypt_verify by the plain decrypt with the flag set.
(gpgme_op_decrypt_verify_start): Pass the flag.
(gpgme_op_decrypt_verify): Pass the flag.
* src/decrypt.c (decrypt_start): Rename to ...
(_gpgme_decrypt_start): this.  Add arg FLAGS.  Pass FLAGS to
engine_op_decrypt.
(gpgme_op_decrypt_start): Adjust for chnage pass 0 for FLAG.
(gpgme_op_decrypt_start): Ditto.
* src/engine.c (_gpgme_engine_op_decrypt_verify): Remove.
(_gpgme_engine_op_decrypt): Add arg FLAGS.
* src/gpgme.def, src/libgpgme.vers: Add new functions.
* src/engine-backend.h (struct engine_ops): Remove member
'decrypt_verify'.  Add FLAGS to 'decrypt'.  Adjust all initialization.
* src/engine-uiserver.c (uiserver_decrypt): Remove.
(uiserver_decrypt_verify): Remove.
(_uiserver_decrypt): Rename to ...
(uiserver_decrypt): this.  Replace arg VERIFY by new arg FLAGS.
* src/engine-gpg.c (gpg_decrypt): Support GPGME_DECRYPT_UNWRAP.
(gpg_encrypt): Support GPGME_ENCRYPT_WRAP.

* tests/run-decrypt.c (main): New option --unwrap.
* tests/run-encrypt.c (main): New option --wrap.
--

Manual testing of that wrap/unwrap feature can be done this way:

 ./run-encrypt --verbose --key Alice /etc/motd &gt; x
 ./run-decrypt --verbose --unwrap x &gt; y
 ./run-encrypt --verbose --key Bob --wrap y &gt; z

1. The message was first encrypted to Alice.
2. Alice decrypts the message receiving a valid OpenPGP message.
3. Alice encrypt that message to Bob

This will also work with encrypted and signed messages; the signature
will be kept intact during re-encryption.  Requires GnuPG 2.1.12.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New API gpgme_op_set_uid_flag.</title>
<updated>2017-03-21T18:03:58Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-03-21T18:02:20Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=421ddd1e6706046c5062417fd69a87e10c9fc0a9'/>
<id>urn:sha1:421ddd1e6706046c5062417fd69a87e10c9fc0a9</id>
<content type='text'>
* src/gpgme.h.in (gpgme_op_set_uid_flag_start): New.
(gpgme_op_set_uid_flag_start): New.
* src/gpgme.def, src/libgpgme.vers: Add them.
* src/genkey.c (addrevuid_start): Change arg revoke to a flag.
(gpgme_op_revuid_start): Pass GENKEY_EXTRAFLAG_REVOKE for the fomer
revoke parameter.
(gpgme_op_revuid): Ditto.
(set_uid_flag): New.
(gpgme_op_set_uid_flag_start): New.
(gpgme_op_set_uid_flag): New.
* src/engine.h (GENKEY_EXTRAFLAG_SETPRIMARY): new.
* src/engine-gpg.c (gpg_adduid): Implement that flag.

* tests/run-genkey.c (main): New command --set-primary.
--

GnuPG-bug-id: 2931
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New encryption flag GPGME_ENCRYPT_THROW_KEYIDS.</title>
<updated>2017-03-21T09:39:33Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-03-21T09:39:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=fab8b1a166fff7265d8a7a7acbbf5f30d26cc93c'/>
<id>urn:sha1:fab8b1a166fff7265d8a7a7acbbf5f30d26cc93c</id>
<content type='text'>
* src/gpgme.h.in (GPGME_ENCRYPT_THROW_KEYIDS): New flag.
* src/engine-gpg.c (gpg_encrypt): Implement flag
(gpg_encrypt_sign): Implement flag.

* tests/run-encrypt.c (main): New option --throw-keyids.
--

It would be nice to also selectively hide recipients (that is gpg
--hidden-recipient) but our API does not ye allow this because it is
based on key objects.  A possible way to implement that would be a API
to set processing flags into a key but this is complicated due to the
reference counting and thus the possibility that a key object is used
by different context.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New public API gpgme_op_keylist_from_data_start.</title>
<updated>2017-03-21T08:50:23Z</updated>
<author>
<name>Andre Heinecke</name>
<email>aheinecke@intevation.de</email>
</author>
<published>2017-03-21T08:38:11Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=35023f313622fb1b34108dd934e84831c58b81aa'/>
<id>urn:sha1:35023f313622fb1b34108dd934e84831c58b81aa</id>
<content type='text'>
* src/gpgme.h.in: New API gpgme_op_keylist_from_data_start.
* src/libgpgme.vers, src/gpgme.def: Add it.
* src/keylist.c (gpgme_op_keylist_from_data_start): New.
* src/engine-backend.h (engine_ops): Add field 'keylist_data'.  Change
all engines to pass NULL for it.
* src/engine.c (_gpgme_engine_op_keylist_data): New.
* src/engine-gpg.c (gpg_keylist_data): New.
(_gpgme_engine_ops_gpg): Register gpg_keylist_data.

* tests/run-keylist.c (main): New option --from-file.
--

Co-authored-by: Werner Koch &lt;wk@gnupg.org&gt;
GnuPG-bug-id: 2819
</content>
</entry>
<entry>
<title>core: Fix minor code style thing.</title>
<updated>2017-03-02T13:52:52Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-03-02T13:52:52Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=ef035f079fb067f207e5477d5ed6c5a68fb41f59'/>
<id>urn:sha1:ef035f079fb067f207e5477d5ed6c5a68fb41f59</id>
<content type='text'>
* src/engine-gpg.c (gpg_add_algo_usage_expire): Use double parenthesis
for bit tests.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Fix expiration time handling when creating keys.</title>
<updated>2017-02-15T15:45:45Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2017-02-15T15:17:13Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=de708e5934cda380dbc3ae51f587c09041de7562'/>
<id>urn:sha1:de708e5934cda380dbc3ae51f587c09041de7562</id>
<content type='text'>
* NEWS: Update.
* doc/gpgme.texi (gpgme_op_createkey): Clarify the meaning of the
'expire' parameter.
(GPGME_CREATE_NOEXPIRE): Document new flag.
(gpgme_op_createsubkey): Clarify the meaning of the 'expire'
parameter.
* src/engine-gpg.c (gpg_add_algo_usage_expire): Fix handling of the
expiration time.
* src/gpgme.h.in (GPGME_CREATE_NOEXPIRE): New macro.
--

Previously, the documentation stated that the expiration time was an
absolute timestamp.  However, this value was passed using the
'seconds=N' syntax to GnuPG which specifies the expiration time in
seconds relative to the creation time.  Fix the documentation.

Furthermore, the documentation stated that using 0 results in keys
that do not expire.  This was communicated to GnuPG by using the
implicit default.  However, as of GnuPG 2.1.17, the default was
changed to create keys that expire within a reasonable timespan.

Fix this discrepancy by aligning the behavior with recent GnuPG
versions: 0 means use a reasonable default, and introduce a flag that
can be used to create keys that do not expire.  Communicate this
explicitly to GnuPG.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>core: Replace all calls to *sprintf by gpgrt_*sprintf.</title>
<updated>2017-02-02T11:35:59Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-02-02T11:35:59Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=15050ce5fce4ed815503db7c029abb38d08970d6'/>
<id>urn:sha1:15050ce5fce4ed815503db7c029abb38d08970d6</id>
<content type='text'>
* configure.ac (vasprintf): Remove check.
* src/vasprintf.c: Remove file.
* src/util.h (vasprintf, asprintf): Remove prototypes.  Replace all
calls to vasprintf and asprintf by gpgrt_vasprintf or gpgrt_asprintf.
Also take care to use gpgrt_free on the returned value.
* src/w32-util.c (_gpgme_get_gpgconf_path): Replace a gpgrt_asprintf
by _gpgme_strconcat.
(snprintf): New macro to use gpgrt_snprintf instead of the system's
standard snprintf.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>Fix gpg_addkey() to work with GPGME_CREATE_NOPASSWD as well.</title>
<updated>2016-12-31T23:09:49Z</updated>
<author>
<name>Ben Kibbey</name>
<email>bjk@luxsci.net</email>
</author>
<published>2016-12-31T23:09:49Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a4b9f1a2b404fd8627d5ac567617510abd55d980'/>
<id>urn:sha1:a4b9f1a2b404fd8627d5ac567617510abd55d980</id>
<content type='text'>
* src/engine-gpg.c (gpg_addkey): Pass --batch to gpg when
GPGME_CREATE_NOPASSWD is set to fix pinentry without loopback mode.

--
Signed-off-by: Ben Kibbey &lt;bjk@luxsci.net&gt;
</content>
</entry>
<entry>
<title>Fix GPGME_CREATE_NOPASSWD without pinentry loopback.</title>
<updated>2016-12-27T00:57:22Z</updated>
<author>
<name>Ben Kibbey</name>
<email>bjk@luxsci.net</email>
</author>
<published>2016-12-27T00:57:22Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=d83b8f0dc84d6cf7fe2e091bd1b103ceedfa3d6c'/>
<id>urn:sha1:d83b8f0dc84d6cf7fe2e091bd1b103ceedfa3d6c</id>
<content type='text'>
* src/engine-gpg.c(gpg_createkey): Pass --batch to gpg when
GPGME_CREATE_NOPASSWD is set.

--
Signed-off-by: Ben Kibbey &lt;bjk@luxsci.net&gt;
</content>
</entry>
<entry>
<title>doc: Replace http: by https: in core source files.</title>
<updated>2016-11-16T12:27:00Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2016-11-16T12:27:00Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=7f5f26fd66e60e60de875c70b1f93f60c0438780'/>
<id>urn:sha1:7f5f26fd66e60e60de875c70b1f93f60c0438780</id>
<content type='text'>
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
</feed>
