aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpg/t-edit-sign.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: Make t-edit-sign idempotentIngo Klöcker2023-02-081-3/+56
| | | | | | | | | | | | | | | * tests/gpg/t-edit-sign.c (test_key, test_key_fpr, import_key, delete_key): New. (main): Remove key_fpr. Import test key to sign. Delete test key after test. -- Using a dedicated test key for testing key signing, which is imported before the test and deleted after the test, makes sure that the keys in the test key ring don't change. This is important for stable results of the key listing tests. GnuPG-bug-id: 6342
* tests: Make t-edit-sign more robust.Werner Koch2022-08-101-4/+2
| | | | | | | * tests/gpg/t-edit-sign.c (interact_fnc): Provide the default answer. -- A default answer to prompts should always be given.
* core: Fix use-after-free issue in testIngo Klöcker2021-06-261-17/+37
| | | | | | | | | | | | * tests/gpg/t-edit-sign.c (sign_key, verify_key_signature): New. (main): Factored out signing and verifying the result. -- Factoring the two steps of the test into different functions fixes the use-after-free issue that was caused by accidentaly using a variable of the first step in the second step. GnuPG-bug-id: 5509
* core: Allow specifying an expiration date for key signaturesIngo Klöcker2021-06-221-0/+201
* src/context.h (struct gpgme_context): Add 'cert_expire'. * src/engine-gpg.c (append_args_from_cert_expire): New. (gpg_edit): Set option according to the new flag. * src/gpgme.c (gpgme_release): Free 'cert_expire'. (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "cert-expire". * tests/gpg/Makefile.am (c_tests): Add new test. (gpg.conf): Write "allow-weak-key-signatures" to gpg.conf. * tests/gpg/t-edit-sign.c: New. -- The new context flag "cert-expire" allows setting the expiration date for key signatures created with gpgme_op_interact. GnuPG-bug-id: 5336, 5505