<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/doc, branch ben/howto-update-05</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=ben%2Fhowto-update-05</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=ben%2Fhowto-update-05'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2018-05-17T07:16:05Z</updated>
<entry>
<title>core: Always fail if an OpenPG message is not integrity protected.</title>
<updated>2018-05-17T07:16:05Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-05-17T07:14:40Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8a0c8c52510d9c2d934f85159f04b666286b1786'/>
<id>urn:sha1:8a0c8c52510d9c2d934f85159f04b666286b1786</id>
<content type='text'>
* src/decrypt.c (struct op_data_t): Add field not_integrity_protected.
(parse_decryption_info): Set this.  Also rename mode to aead_algo for
clarity.
(_gpgme_decrypt_status_handler): Force failure in case of a missing
MDC.
--

This extra check makes sure that a missing or stripped MDC in
 - gpg &lt; 2.1
 - or gpg 2.2 with an old cipher algorithm
will lead to a decryption failure.  gpg 2.3 will always fail in this
case.  Implementing this check here and not backporting the 2.3 change
to 2.2 has the benefit that all GPGME using applications are protected
but scripts relying on rfc2440 (i.e. without MDC) will only break when
migrating to 2.3.

Note that S/MIME has no integrity protection mechanism but gpgsm
neither emits a DECRYPTION_INFO status line, so an error will not be
triggered.  If in the future gpgsm supports authenticated encryption
it may issue a DECRYPTION_INFO line to force a failure here but it
will in that case also emit a DECRYPTION_FAILED anyway.

GnuPG-bug-id: 3981
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>doc: Suggest the use of strconcat for recipient strings.</title>
<updated>2018-04-20T06:56:53Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-20T06:56:01Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=969700bc56ce3830bdd0ac498c14cd9f9e7db7fe'/>
<id>urn:sha1:969700bc56ce3830bdd0ac498c14cd9f9e7db7fe</id>
<content type='text'>
--
GnuPG-bug-id: 3775

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New convenience constant GPGME_KEYLIST_MODE_LOCATE.</title>
<updated>2018-04-18T15:59:29Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-18T15:59:29Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=55e9a94680370e584fbe5d21161a2cee3fe95744'/>
<id>urn:sha1:55e9a94680370e584fbe5d21161a2cee3fe95744</id>
<content type='text'>
* src/gpgme.h.in (GPGME_KEYLIST_MODE_LOCATE): New.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Add 'is_mime' flags to the verify and decrypt results.</title>
<updated>2018-04-18T13:20:35Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-18T13:20:35Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=65479fe7b871ad6237d5a8959b73afcc7db784da'/>
<id>urn:sha1:65479fe7b871ad6237d5a8959b73afcc7db784da</id>
<content type='text'>
* src/op-support.c (_gpgme_parse_plaintext): Add arg r_mime.
* src/decrypt.c (_gpgme_decrypt_status_handler): Ser mime flag.
* src/verify.c (_gpgme_verify_status_handler): Ditto.
* src/gpgme.h.in (gpgme_op_verify_result_t): Append fields 'is_mime'
and '_unused'.
(gpgme_op_decrypt_result_t): New field 'is_mime'.  Shrink '_unused'.

* tests/run-decrypt.c (print_result): Print MIME flag.
* tests/run-verify.c (print_result): Ditto.
--

Note that this flag (Liternal Data packet's 'm' mode) is only
specified in RFC-4880bis.  To use it you currently need to add
"rfc4880bis" to the the gpg.conf.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Extend decryption result with symkey_algo.</title>
<updated>2018-04-17T11:48:56Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-17T11:48:56Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=01435da498af9f7538d7ee810392d7eaa407957e'/>
<id>urn:sha1:01435da498af9f7538d7ee810392d7eaa407957e</id>
<content type='text'>
* src/gpgme.h.in (gpgme_op_decrypt_result_t): Add field 'symkey_algo'.
* src/decrypt.c (release_op_data): Free SYMKEY_ALGO.
(gpgme_op_decrypt_result): Make sure SYMKEY_ALGO is not NULL.
(parse_decryption_info): New.
(_gpgme_decrypt_status_handler): Parse DECRYPTION_INFO status.
* src/conversion.c (_gpgme_cipher_algo_name): New.
(_gpgme_cipher_mode_name): New.

* tests/run-decrypt.c (print_result): Print SYMKEY_ALGO

* src/util.h (_gpgme_map_gnupg_error): Remove obsolete prototype.
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New keyword --file for OpenPGP recpstring.</title>
<updated>2018-04-17T10:40:30Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-17T10:40:30Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=3589da0500f1c80717e658d103a0cb2751d27b49'/>
<id>urn:sha1:3589da0500f1c80717e658d103a0cb2751d27b49</id>
<content type='text'>
* src/engine-gpg.c (append_args_from_recipients_string): Add new
flags.
--

Now you can use gpgme to encrypt without first importing a key.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: For OpenPGP let offline mode disable dirmngr.</title>
<updated>2018-04-17T09:06:27Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-17T09:06:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=c143ab692c7fc7cf2ec0aebe40b9479ee15eaba9'/>
<id>urn:sha1:c143ab692c7fc7cf2ec0aebe40b9479ee15eaba9</id>
<content type='text'>
* src/engine-gpg.c (struct engine_gpg): New flag.offline.
(gpg_set_engine_flags): Set it.  Also fix setting of no_symkey_cache.
(build_argv): Pass --disable-dirmngr in offline mode.
--

GnuPG-bug-id: 3831
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Allow for --hidden keyword in OpenPGP recpstrings.</title>
<updated>2018-04-17T08:04:20Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-17T08:04:20Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=4bba3b8e2c350b8ff0d562ec63cc03a096448d84'/>
<id>urn:sha1:4bba3b8e2c350b8ff0d562ec63cc03a096448d84</id>
<content type='text'>
* src/engine-gpg.c (append_args_from_recipients_string): Add special
keywords.
--

GnuPG-bug-id: 3775
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New encryption flag GPGME_ENCRYPT_WANT_ADDRESS.</title>
<updated>2018-04-17T07:40:27Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-17T07:40:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=86efba2be270d2cdd0bc66c9d3fe190495b7af2f'/>
<id>urn:sha1:86efba2be270d2cdd0bc66c9d3fe190495b7af2f</id>
<content type='text'>
* src/gpgme.h.in (GPGME_ENCRYPT_WANT_ADDRESS): New flag.
* src/engine-gpg.c (add_arg_recipient): New.
(add_arg_recipient_string): New.
(append_args_from_recipients): Call new helper function.
(append_args_from_recipients_string): Ditto.
* src/gpgme-json.c (op_encrypt): Add flag "want-address".
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Add extended versions of the encrypt functions.</title>
<updated>2018-04-17T06:45:00Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-04-17T06:33:44Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a1f76b3b54b75a150fe272b804d85ffd40a507a6'/>
<id>urn:sha1:a1f76b3b54b75a150fe272b804d85ffd40a507a6</id>
<content type='text'>
* src/gpgme.h.in (gpgme_op_encrypt_ext_start) New.
(gpgme_op_encrypt_ext): New.
(gpgme_op_encrypt_sign_ext_start): New.
(gpgme_op_encrypt_sign_ext): New.
* src/libgpgme.vers, tests/run-encrypt.c: Add them.

* src/encrypt.c (encrypt_start): Add arg recpstring.
(gpgme_op_encrypt): Factor code out to ...
(gpgme_op_encrypt_ext): new function with new arg recpstring.
(gpgme_op_encrypt_start): Factor code out to ...
(gpgme_op_encrypt_ext_start): new function with new arg recpstring.
* src/encrypt-sign.c (encrypt_sign_start): Add arg recpstring.
(gpgme_op_encrypt_sign): Factor code out to ...
(gpgme_op_encrypt_sign_ext): new function with new arg recpstring.
(gpgme_op_encrypt_sign_start): Factor code out to ...
(gpgme_op_encrypt_sign_ext_start): new function with new arg
recpstring.

* src/engine-backend.h (struct engine_ops): Change fields encrypt and
encrypt_sign.
* src/engine.c (_gpgme_engine_op_encrypt): Add arg recpstring and pass
to engine.
(_gpgme_engine_op_encrypt_sign): Ditto.
* src/engine-gpg.c (append_args_from_recipients_string): New.
(gpg_encrypt): Add arg recpstring and call new function as needed.
(gpg_encrypt_sign): Ditto.
* src/engine-gpgsm.c (set_recipients_from_string): New.
(gpgsm_encrypt): Add arg recpstring and call new function as needed.
* src/engine-uiserver.c (set_recipients_from_string): New.
(uiserver_encrypt): Add arg recpstring and call new function as
needed.

* tests/run-encrypt.c (xstrdup): New.
(main): Add option --keystring.

* src/gpgme-json.c (get_keys): Simplify.
(op_encrypt): Modify to make use of the extended encrypt function.

--

This new feature can be used to avoid the need for a key lookup and
thus several extra calls to the backend.

Note that run-test uses a semicolon as delimiter because that make
testing the feature on the command line much easier.

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