<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/tests, branch ikloecker/t6550</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=ikloecker%2Ft6550</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=ikloecker%2Ft6550'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2023-12-19T12:12:59Z</updated>
<entry>
<title>core: Support writing the decrypt/verify output directly to a file</title>
<updated>2023-12-19T12:12:59Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-12-19T10:26:15Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=5efd3486a9fa9f4b0f383aca2f2f01412e73237c'/>
<id>urn:sha1:5efd3486a9fa9f4b0f383aca2f2f01412e73237c</id>
<content type='text'>
* src/engine-gpg.c (gpg_decrypt): Pass output file name to gpg if output
has file name set.
(gpg_verify): Ditto.

* tests/run-decrypt.c (show_usage): New option --output.
(main): Parse new option. Set file name on output if --output is given.
Do not print output if --output is given.
* tests/run-verify.c (show_usage): New option --output.
(main): Parse new option. Set file name on output if --output is given.
--

This change makes it possible to tell gpg to write the output (i.e. the
decrypted/verified data) directly to a file with given file name instead
of piping the output back to gpgme.

GnuPG-bug-id: 6550
</content>
</entry>
<entry>
<title>core: Support direct signing of file with gpg</title>
<updated>2023-12-19T12:09:33Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-12-15T09:05:19Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=963ace1f9f39f09fee522b996e05d42040b1f4b4'/>
<id>urn:sha1:963ace1f9f39f09fee522b996e05d42040b1f4b4</id>
<content type='text'>
* src/gpgme.h.in (GPGME_SIG_MODE_FILE): New signature mode flag.
* src/engine-gpg.c (gpg_sign): Separate signature mode from additional
flags. Check for incompatible flags. Explicitly set output to stdout if
no output file is used. Pass filename instead of fd to gpg when new flag
is set.
* src/engine-gpgsm.c (gpgsm_sign): Return error if new flag is set.
* src/engine-uiserver.c (uiserver_sign): Ditto.
* src/sign.c (sign_start): Consider new flag on check for invalid flags.

* tests/run-sign.c (show_usage): New options --detach and
--direct-file-io.
(main): Parse new options. Create a detached signature if --detach is
given. Make gpg read the input file itself if --direct-file-io is given.
--

With this change the gpgme_op_sign* functions gain the possibility to
make gpg read the data to sign directly from a file instead of from an
input FD to which it is written by gpgme.

GnuPG-bug-id: 6550
</content>
</entry>
<entry>
<title>core: Support direct encryption of file with gpg</title>
<updated>2023-12-19T12:07:45Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-12-14T09:59:47Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=0221d7f28a315d305409cf2dcae853c22ad94d31'/>
<id>urn:sha1:0221d7f28a315d305409cf2dcae853c22ad94d31</id>
<content type='text'>
* src/gpgme.h.in (GPGME_ENCRYPT_FILE): New encryption flag.
* src/engine-gpg.c (gpg_encrypt, gpg_encrypt_sign): Check for
incompatible flags. Pass filename instead of fd to gpg when new flag is
set.
* src/engine-gpgsm.c (gpgsm_encrypt): Return error if new flag is set.
* src/engine-uiserver.c (uiserver_encrypt): Ditto.

* tests/run-encrypt.c (show_usage): New option --direct-file-io.
(main): Parse new option. Make gpg read the input file itself if the
option is given.
--

With this change the gpgme_op_encrypt* and gpgme_op_encrypt_sign*
functions gain the possibility to make gpg read the data to (sign and)
encrypt directly from a file instead of from an input FD to which it is
written by gpgme.

GnuPG-bug-id: 6550
</content>
</entry>
<entry>
<title>tests: Add option --chain to run-keylist</title>
<updated>2023-11-10T08:45:35Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-11-10T08:44:59Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=1bfd5e92d0236d1db9782904c1a2d5dc7461dae2'/>
<id>urn:sha1:1bfd5e92d0236d1db9782904c1a2d5dc7461dae2</id>
<content type='text'>
* tests/run-keylist.c (xstrdup): New.
(main): Add option.
--

This allows to list the entire chain.
</content>
</entry>
<entry>
<title>doc: Fix typos in documentation and source code comments</title>
<updated>2023-10-13T07:18:12Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-10-13T07:18:12Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=57205c1dfafdf86eebef8a3a358cf3bd6a297d88'/>
<id>urn:sha1:57205c1dfafdf86eebef8a3a358cf3bd6a297d88</id>
<content type='text'>
--

Anonymous contribution

Signed-off-by: Ingo Klöcker &lt;dev@ingo-kloecker.de&gt;
</content>
</entry>
<entry>
<title>core: Add key capability flags has_encrypt etc.</title>
<updated>2023-10-05T12:18:03Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-10-05T12:10:01Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=b63d203d3ba49483b079fb118a90990c452cd232'/>
<id>urn:sha1:b63d203d3ba49483b079fb118a90990c452cd232</id>
<content type='text'>
* src/gpgme.h.in (struct _gpgme_key): Add flags has_encrypt,
has_certify, has_sign, and has_authenticate.
* src/keylist.c (finish_key): Set these flags.
* tests/run-keylist.c (main): Print them.
--

GnuPG-bug-id: 6748
</content>
</entry>
<entry>
<title>tests: Re-add --with-secret option</title>
<updated>2023-09-04T15:31:18Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-09-04T15:31:18Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8fde9cbe22885116e4779ea70e13bd0c2273d604'/>
<id>urn:sha1:8fde9cbe22885116e4779ea70e13bd0c2273d604</id>
<content type='text'>
* tests/run-keylist.c (main): Handle option --with-secret again.
--

Re-add handling of --with-secret option that was accidentally removed
with the previous commit.

GnuPG-bug-id: 6705
</content>
</entry>
<entry>
<title>New mode to list a v5 fingerprint for v4 packets.</title>
<updated>2023-09-04T15:03:52Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-09-04T15:03:01Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=e36b2d1bce4bb6281e18f53d06d7831e6d6f5a09'/>
<id>urn:sha1:e36b2d1bce4bb6281e18f53d06d7831e6d6f5a09</id>
<content type='text'>
* src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_V5FPR): New.
(struct _gpgme_subkey): Add field v5fpr.
* src/engine-gpg.c (gpg_keylist_build_options): Pass new option to
gpg.
* src/key.c (gpgme_key_unref): Free new field.
* src/keylist.c (op_data_t): Parse and add "fp2" line.

* tests/run-keylist.c (show_usage): Add option --v5fpr.

* src/keylist.c (op_data_t): Add field failure_code.
(keylist_status_handler): Handle special value.
(gpgme_op_keylist_end): Return an error if a FAILURE line has been
seen.
--

Note that the failure code part has been added to better diagnose
problems if a wrong gpg version is used.  If verything works right we
should not get this because we check that the gnupg version sis either
&gt;= 2.4.4 or less than 2.3 and &gt;= 2.2.42.

Note further that the v5fpr field may also be used to get the SHA-256
fingerprint of X.509 certificates (even without passing the new mode
flag).

GnuPG-bug-id: 6705
</content>
</entry>
<entry>
<title>Support GPGME_ENCRYPT_ALWAYS_TRUST also for S/MIME.</title>
<updated>2023-08-31T10:02:02Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-08-31T10:02:02Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=d75b2a91517397261c2508dba058611f803c0733'/>
<id>urn:sha1:d75b2a91517397261c2508dba058611f803c0733</id>
<content type='text'>
* src/engine-gpgsm.c (gpgsm_encrypt): Send the always-trust options.

* tests/run-encrypt.c: Add option --always-trust.
--

Note that the run-encrypt test tool used to assume always-trust for
OpenPGP since 1.7.0 This bug has also been fixed by introducing the
explicit option.

GnuPG-bug-id: 6559
</content>
</entry>
<entry>
<title>tests: Support offline mode in run-import</title>
<updated>2023-08-14T12:04:44Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-08-14T09:39:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=150a2f9e4e5afe359fec2bbb017f6d0cfa7ca4a7'/>
<id>urn:sha1:150a2f9e4e5afe359fec2bbb017f6d0cfa7ca4a7</id>
<content type='text'>
* tests/run-import.c (show_usage): New option --offline.
(main): Parse new option. Set offline mode accordingly.
--

This allows testing gpgme_op_import with (and without) offline mode.

GnuPG-bug-id: 6648
</content>
</entry>
</feed>
