<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/ops.h, branch gpgme-2.1.2</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-2.1.2</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-2.1.2'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2025-07-16T14:45:05Z</updated>
<entry>
<title>Rename an internal function for clarity</title>
<updated>2025-07-16T14:45:05Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2025-07-16T14:43:55Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=1821ebaa333dfadf936b8fc38dd8483abee7aab3'/>
<id>urn:sha1:1821ebaa333dfadf936b8fc38dd8483abee7aab3</id>
<content type='text'>
* src/key.c (_gpgme_key_add_sig): Rename to ...
(_gpgme_key_add_uid_sig): this.
</content>
</entry>
<entry>
<title>New decrypt flags GPGME_DECRYPT_LISTONLY.</title>
<updated>2025-03-18T15:22:58Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2025-03-18T15:22:58Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=91a59d2a35540769c055da2341b5face0be6c286'/>
<id>urn:sha1:91a59d2a35540769c055da2341b5face0be6c286</id>
<content type='text'>
* src/gpgme.h.in (GPGME_DECRYPT_LISTONLY): New.
* src/decrypt.c (op_data_t): Add member list_only.
(_gpgme_decrypt_status_handler): Do not return NO_DATA in list_only
mode.
(_gpgme_op_decrypt_init_result): Add arg flags and set the list_only
flag.
(_gpgme_decrypt_start): Pss flags to the init function.
* src/decrypt-verify.c (decrypt_verify_start): Ditto.
* src/engine-gpg.c (gpg_decrypt): Add --list-only if flag is set.

* tests/run-decrypt.c (main): Add option --list-only.
</content>
</entry>
<entry>
<title>Remove the long deprecated and never working trust list functions.</title>
<updated>2025-02-21T10:01:28Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2025-02-21T09:56:00Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=7e6a65e66a96278bed5fed6d0b75887c0f032c4e'/>
<id>urn:sha1:7e6a65e66a96278bed5fed6d0b75887c0f032c4e</id>
<content type='text'>
* src/trust-item.c: Remove file.
* src/trustlist.c: Remove file.
* src/Makefile.am (main_sources): Remove those files.
* src/gpgme.h.in (GPGME_EVENT_NEXT_TRUSTITEM): Remove.
(gpgme_trust_item_t, GpgmeTrustItem): Remove.
(gpgme_op_trustlist_start): Remove.
(gpgme_op_trustlist_next): Remove.
(gpgme_op_trustlist_end): Remove.
(gpgme_trust_item_ref): Remove.
(gpgme_trust_item_unref, gpgme_trust_item_release): Remove.
* src/gpgme.def: Remove removed functions.
* src/libgpgme.vers: Ditto.
--

The GPGME_ATTR_foo based functions are deprecated since 2003 and it is
time to remove them now.

The trustlist functions never worked:

  This never worked in reality because the required feature has been
  removed from GnuPG version 1.3.2 soon after introduction of this
  feature in gpgme in 2003. It was anyway marked as experimental.

They even returned GPG_ERR_NOT_IMPLEMENTED since gpgme 1.14.0 (summer
2000) instead of failing with a incomprehensible error code.

GnuPG-bug-id: 4834
</content>
</entry>
<entry>
<title>core: Report failed encryption/signing if gpgtar didn't emit SUCCESS</title>
<updated>2024-09-20T08:05:30Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2024-09-20T08:05:30Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=79ca846993638de359936f86eafaa23f75c9f85d'/>
<id>urn:sha1:79ca846993638de359936f86eafaa23f75c9f85d</id>
<content type='text'>
src/encrypt-sign.c (encrypt_sym_status_handler): Add call of
_gpgme_encrypt_status_handler.
(encrypt_sign_start): Call _gpgme_op_encrypt_init_result with
success_required=1 if archive is created. Always call
_gpgme_op_sign_init_result with success_required=0 because the encrypt
status handler already checks for SUCCESS.
src/encrypt.c (op_data_t): Add success_seen flag.
(_gpgme_encrypt_status_handler): Return error if we didn't see a
required SUCCESS on GPGME_STATUS_EOF. Set success_seen flag on
GPGME_STATUS_SUCCESS.
(encrypt_sym_status_handler): Add call of _gpgme_encrypt_status_handler.
(_gpgme_op_encrypt_init_result): Add argument success_required. Set
success_seen flag if SUCCESS is not required.
(encrypt_start): Call _gpgme_op_encrypt_init_result with
success_required=1 if archive is created.
src/ops.h (_gpgme_op_sign_init_result, _gpgme_op_encrypt_init_result):
Add argument success_required to prototypes.
src/sign.c (op_data_t): Add success_seen flag.
(_gpgme_sign_status_handler): Return error if we didn't see a
required SUCCESS on GPGME_STATUS_EOF. Set success_seen flag on
GPGME_STATUS_SUCCESS.
(sign_init_result): Add argument success_required. Set success_seen
flag if SUCCESS is not required.
(_gpgme_op_sign_init_result): Add argument success_required and
forward it to sign_init_result.
(sign_start): Call sign_init_result with success_required=1 if archive
is created.
--

gpgtar emits a SUCCESS status just before successful termination. If the
process terminates unexpectedly (e.g. because it's killed) then gpgme
now reports GPG_ERR_EOF. The SUCCESS status is only required if a
signed and/or encrypted archive is created which is only supported for
OpenPGP. The other engines reject the GPGME_ENCRYPT_ARCHIVE flag so that
we don't need to check the protocol in the generic code.

This change also adds handling of invalid recipients in case symmetric
encryption is used which makes sense because one can combine symmetric
and public key encryption.

GnuPG-bug-id: 6554
</content>
</entry>
<entry>
<title>core: Add information about revocation keys to keys</title>
<updated>2024-05-21T14:38:59Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2024-05-15T08:31:46Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=adadfac997a812699049cd9a5f484cbcabff5bfd'/>
<id>urn:sha1:adadfac997a812699049cd9a5f484cbcabff5bfd</id>
<content type='text'>
* src/gpgme.h.in (struct _gpgme_revocation_key,
gpgme_revocation_key_t): New.
(struct _gpgme_key): Add fields 'revkeys', '_last_revkey'.
* src/key.c (_gpgme_key_add_rev_key): New.
(gpgme_key_unref): Free revkeys.
* src/keylist.c (keylist_colon_handler): Parse rvk lines.
* src/ops.h (_gpgme_key_add_rev_key): New.

* tests/run-keylist.c (main): Print revocation key info.
--

GnuPG-bug-id: 7118
</content>
</entry>
<entry>
<title>core: Handle import status lines during keylist operation</title>
<updated>2022-05-04T12:23:42Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2022-05-04T12:23:42Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=f3ca57dfd7af19f9b2fd01616a81dc889707a4d3'/>
<id>urn:sha1:f3ca57dfd7af19f9b2fd01616a81dc889707a4d3</id>
<content type='text'>
* src/import.c (import_status_handler): Rename to ...
(_gpgme_import_status_handler): this. Make non-static.
(_gpgme_op_import_init_result): New.
(_gpgme_op_import_start, _gpgme_op_import_keys_start,
_gpgme_op_receive_keys_start): Call _gpgme_op_import_init_result.
* src/keylist.c (keylist_status_handler): Call
_gpgme_import_status_handler to handle import status lines.
(gpgme_op_keylist_start, gpgme_op_keylist_ext_start): Call
_gpgme_op_import_init_result.
* src/ops.h (_gpgme_op_import_init_result,
_gpgme_import_status_handler): New prototypes.
--

If a keylist operation with keylist mode GPGME_KEYLIST_MODE_LOCATE is
run, then gpg emits import status lines. Handling those status lines
allows users to retrieve the result of a --locate-(external)-keys
command.

GnuPG-bug-id: 5951
</content>
</entry>
<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>
</feed>
