<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/ops.h, branch gpgme-1.13.1</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.13.1</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.13.1'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2018-07-19T15:39:09Z</updated>
<entry>
<title>core: Blank out the plaintext after decryption failure.</title>
<updated>2018-07-19T15:39:09Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-07-19T15:38:50Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=085cdeddef637cc057362fcbde13b0261b8699ec'/>
<id>urn:sha1:085cdeddef637cc057362fcbde13b0261b8699ec</id>
<content type='text'>
* src/data.h (data_prop_t): New enum.
(struct gpgme_data): Add field propidx.
* src/data.c (property_t): New.
(property_table, property_table_size, property_table_lock): New.
(insert_into_property_table): New.
(remove_from_property_table): New.
(_gpgme_data_get_dserial): New.
(_gpgme_data_set_prop): New.
(_gpgme_data_get_prop): New.
(_gpgme_data_new): Connect new object to property_table.
(_gpgme_data_release): Remove from property_table.
(gpgme_data_read): With DATA_PROP_BLANKOUT set don't fill the buffer.
* src/data-mem.c (gpgme_data_release_and_get_mem): Likewise.
* src/decrypt.c (struct op_data): Add field plaintext_dserial.
(_gpgme_op_decrypt_init_result): Add arg plaintext and init new field.
(_gpgme_decrypt_status_handler): Set DATA_PROP_BLANKOUT on decryption
failure.
(_gpgme_decrypt_start): Pass PLAIN to the init function.
* src/decrypt-verify.c (decrypt_verify_start): Ditto.
* configure.ac: Check for stdint.h and bail out if uint64_t is not
available.
--

This is a best effort feature to not output plaintext after a
decryption failure (e.g. due to no or broken authenticated
encryption).  It always work when using a memory object and reading it
after the decryption but it can't work reliable when the user is
reading from the data object while the decryption process is still
running.

This is quite a large change because the data objects and the context
objects are allowed to be owned by different threads.  Thus a
synchronization is needed and we do this with a global table of all
data objects to which the context objects can do soft-linking via a
unique data object serial number.

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: 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: Change the way TOFU information are represented.</title>
<updated>2016-08-23T13:24:10Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2016-08-23T13:22:28Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=be4ff75d7d5ac6ed15feb245ef3cec59b4bad561'/>
<id>urn:sha1:be4ff75d7d5ac6ed15feb245ef3cec59b4bad561</id>
<content type='text'>
* src/gpgme.h.in (struct _gpgme_signature): Remove field 'tofu'.  Add
field 'key'.
(struct _gpgme_key): Add field 'fpr'.
(struct _gpgme_user_id): Add field 'tofu'.
(struct _gpgme_tofu_info): Remove fields 'address' and 'fpr'.
* src/key.c (gpgme_key_unref): Release TOFU and FPR.
* src/keylist.c (keylist_colon_handler): Store the fingerprint of the
first subkey also in KEY.
* src/verify.c (release_tofu_info): Remove.
(release_op_data): Release KEY.
(parse_tofu_user): Rewrite for new data structure.
(parse_tofu_stats): Ditto.
(parse_tofu_stats_long): Ditto.
* tests/run-verify.c (print_result): Ditto.
* tests/run-keylist.c (main): Print more fields.
--

TOFU information are now associated with the user ID and not with a
separate object.

Note that this breaks code relying on the former non-released TOFU
feature.  The C++ bindings won't work right now.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>Return dedicated error code for all subkeys expired or revoked.</title>
<updated>2016-05-17T18:23:28Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2016-05-17T18:21:01Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=315fb73d4a774e2c699ac1804f5377559b4d0027'/>
<id>urn:sha1:315fb73d4a774e2c699ac1804f5377559b4d0027</id>
<content type='text'>
* src/gpgme.h.in (GPGME_STATUS_KEY_CONSIDERED): New.
(GPGME_SIGSUM_TOFU_CONFLICT): New.
* src/status-table.c (KEY_CONSIDERED): New.
* src/op-support.c (_gpgme_parse_inv_recp): Add argc KC_FPR and
KC_FLAGS.  Use calloc.  Detect all expired or revoked subkeys.
(_gpgme_parse_key_considered): New.
* src/sign.c (op_data_t): Add fields KC_FPR and KC_FLAGS.
(release_op_data): Free KC_FPR.
(_gpgme_sign_status_handler): Handle STATUS_KEY_CONSIDERED.
* src/encrypt.c (op_data_t): Add fields KC_FPR and KC_FLAGS.
(release_op_data): Free KC_FPR.
(_gpgme_encrypt_status_handler): Handle STATUS_KEY_CONSIDERED.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>Improve error return by checking the FAILURE status.</title>
<updated>2015-08-25T11:23:51Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2015-08-25T11:22:43Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8ddc5801ade02297924447df5745c8877a96e5e3'/>
<id>urn:sha1:8ddc5801ade02297924447df5745c8877a96e5e3</id>
<content type='text'>
* src/gpgme.h.in (GPGME_STATUS_FAILURE): New.
* src/status-table.c (FAILURE): New.
* src/op-support.c (_gpgme_parse_failure): New.
* src/passphrase.c (_gpgme_passphrase_status_handler): Forward FAILURE
status line to the status callback.

* src/decrypt.c (op_data_t): Add field failure_code.
(_gpgme_decrypt_status_handler): Parse that code and act upon it on EOF.
* src/encrypt.c (op_data_t): Add field failure_code.
(_gpgme_encrypt_status_handler): Parse that code and act upon it on EOF.
* src/genkey.c (op_data_t): Add field failure_code.
(genkey_status_handler): Parse that code and act upon it on EOF.
* src/passwd.c (op_data_t): Add field failure_code.
(passwd_status_handler): Parse that code and act upon it on EOF.
* src/sign.c (op_data_t): Add field failure_code.
(_gpgme_sign_status_handler): Parse that code and act upon it on EOF.
* src/verify.c (op_data_t): Add field failure_code.
(_gpgme_verify_status_handler): Parse that code and act upon it on EOF.

--

This requires GnuPG 2.1.8 to actually make a difference.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>Remove all trailing whitespace from source files</title>
<updated>2012-09-25T13:29:49Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2012-09-25T13:29:49Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=139e798c8782b09460052a453142addf1174d878'/>
<id>urn:sha1:139e798c8782b09460052a453142addf1174d878</id>
<content type='text'>
--
Command used:  sed -i 's,[ \t]*$,,' FILE
</content>
</entry>
<entry>
<title>2010-04-19  Marcus Brinkmann  &lt;marcus@g10code.de&gt;</title>
<updated>2010-04-19T16:59:23Z</updated>
<author>
<name>Marcus Brinkmann</name>
<email>mb@g10code.com</email>
</author>
<published>2010-04-19T16:59:23Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=dfefe1b390bb5d15d7ef3e0564378a8139d2d335'/>
<id>urn:sha1:dfefe1b390bb5d15d7ef3e0564378a8139d2d335</id>
<content type='text'>
	* assuan-support.c (my_spawn): Cast to avoid warning.
	* engine-g13.c (g13_new): Make ARGV array of pointer to const
	char.
	(g13_assuan_simple_command) [!USE_DESCRIPTOR_FUNCTION]: Don't define.
	* ops.h (_gpgme_key_append_name): Same in prototype.
	* key.c (_gpgme_key_append_name): Make SRC argument pointer to
	const char.
	* posix-util.c (_gpgme_get_uiserver_socket_path): Make HOMEDIR
	const.
	* vfs-mount.c (gpgme_op_vfs_transact_start): Never define this
	potentially useful but currently unused function.
	* vfs-create.c (gpgme_op_vfs_transact_start): Likewise.

</content>
</entry>
<entry>
<title>2009-11-10  Marcus Brinkmann  &lt;marcus@g10code.de&gt;</title>
<updated>2009-11-10T09:07:19Z</updated>
<author>
<name>Marcus Brinkmann</name>
<email>mb@g10code.com</email>
</author>
<published>2009-11-10T09:07:19Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=96cf17b15995c9b925f80a64dbd42c1305ca9895'/>
<id>urn:sha1:96cf17b15995c9b925f80a64dbd42c1305ca9895</id>
<content type='text'>
	* configure.ac: Activate UIServer if FD passing is enabled and
	Assuan is available.

m4/
2009-11-10  Marcus Brinkmann  &lt;marcus@g10code.de&gt;

	* libassuan.m4: Fix LIBASSUAN_VERSION.

src/
2009-11-10  Marcus Brinkmann  &lt;marcus@g10code.de&gt;

	* Makefile.am (uiserver_components): New variable.
	(main_sources): Add it.
	* ops.h, key.c (_gpgme_key_append_name): Take CONVERT argument,
	implement it.  Adjust callers.
	(gpgme_key_from_uid): New function.
	* gpgme.h.in (gpgme_protocol_t): Add GPGME_PROTOCOL_DEFAULT.
	(gpgme_encrypt_flags_t): Add GPGME_ENCRYPT_PREPARE,
	GPGME_ENCRYPT_EXPECT_SIGN.
	(gpgme_set_sub_protocol, gpgme_key_from_uid): New functions.
	* libgpgme.vers, gpgme.def: Add new functions.
	* gpgme.c (gpgme_set_protocol): Add UIServer protocol.
	(gpgme_set_sub_protocol): New function.
	(gpgme_get_protocol_name): Add UIServer and default protocol.
	* assuan-support.c: Return correct error values, implement
	socketpair for POSIX.
	* priv-io.h, posix-io.c, w32-io.c, w32-glib-io.c,
	w32-qt-io.cpp (_gpgme_io_spawn): Add ATFORK and ATFORKVALUE
	arguments.  Implement it for POSIX.  Adjust all callers.
	* engine.h, engine-backend.h (_gpgme_engine_set_protocol)
	(_gpgme_engine_op_decrypt_verify): New prototypes.  Adjust all
	users.
	* engine.c (engine_ops, gpgme_get_engine_info): Add UIServer
	engine.
	(_gpgme_engine_set_protocol, _gpgme_engine_op_decrypt_verify): New
	function.
	* decrypt-verify.c (decrypt_verify_start): Call
	_gpgme_engine_op_decrypt_verify.
	* util.h, posix-util.c,
	w32-util.c (_gpgme_get_uiserver_socket_path): New function.
	* engine-gpgsm.c (gpgsm_set_fd): Fix _gpgme_io_pipe invocation.
	* gpgme-tool.c: Some support for UIServer protocol.
	* engine-uiserver.c: New file.

</content>
</entry>
<entry>
<title>2009-10-30  Marcus Brinkmann  &lt;marcus@g10code.de&gt;</title>
<updated>2009-10-30T14:21:08Z</updated>
<author>
<name>Marcus Brinkmann</name>
<email>mb@g10code.com</email>
</author>
<published>2009-10-30T14:21:08Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=9d3fdd8c96b79ecbd56cf6b1a424bb2e2cd5236d'/>
<id>urn:sha1:9d3fdd8c96b79ecbd56cf6b1a424bb2e2cd5236d</id>
<content type='text'>
	* configure.ac: Check for argp.h and error_t.

src/
2009-10-30  Marcus Brinkmann  &lt;marcus@g10code.de&gt;

	* Makefile.am (noinst_PROGRAMS): New target gpgme-tool.
	(gpgme_tool_LDADD): New variable.
	* gpgme-tool.c: New file.
	* ops.h (_gpgme_sig_notation_clearm _gpgme_signers_clear): New
	prototypes.
	* gpgme.c (gpgme_set_protocol): Allow GPGME_PROTOCOL_GPGCONF (when
	had that gone missing?).
	(_gpgme_sig_notation_clear): New function without debug output.
	(gpgme_release): Call it and _gpgme_signers_clear.
	* signers.c (_gpgme_signers_clear): New function without debug output.
	* g13.c (gpgme_op_vfs_mount): Add debug output.
	* assuan-support.c (my_spawn): Allow fd_child_list to be NULL.
	* conversion.c (_gpgme_encode_percent_string): Fix infinite loop.
	* debug.h: Put tag in front of debug lines, should make for nicer
	output.
	* engine-assuan.c (llass_new): Use our new system hooks for libassuan.
	* engine-g13.c (g13_new): Remove redundant assuan context allocation.
	* version.c (gpgme_check_version_internal): Delay debug output
	until after gpgme_check_version was called.

</content>
</entry>
</feed>
