aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpg (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core: New API functions gpgme_set_sender, gpgme_get_sender.Werner Koch2016-10-251-0/+49
| | | | | | | | | | | | | | | | | | | | | | | * src/context.h (struct gpgme_context): Add field 'sender'. * src/gpgme.c: Include mbox-util.h. (gpgme_release): Free SENDER. (gpgme_set_sender): New. (gpgme_get_sender): New. * src/gpgme.def, src/libgpgme.vers: Add new functions. * src/engine-gpg.c (append_args_from_sender): New. (gpg_encrypt_sign, gpg_sign): Call append_args_from_sender. (gpg_verify): Add arg CTX. Call append_args_from_sender/ * src/engine-gpgsm.c (gpgsm_verify): Add dummy arg CTX. * src/engine-uiserver.c (uiserver_verify): Ditto. * src/engine.c (_gpgme_engine_op_verify): Add arg CTX. * src/verify.c (verify_start): Pass CTX to engine function. * tests/gpg/t-verify.c (main): Add some checks for new functions. * tests/run-sign.c (main): Add option --sender. * tests/run-verify.c (main): Ditto. Signed-off-by: Werner Koch <[email protected]>
* tests: Make t-cancel more portable.Werner Koch2016-10-141-1/+7
| | | | | | * tests/gpg/t-cancel.c: Include sys/time.h and protect sys/select.h. Signed-off-by: Werner Koch <[email protected]>
* Add missing includes.Justus Winter2016-10-061-0/+1
| | | | | | | | * lang/cpp/src/key.cpp: Include <strings.h> for 'strcasecmp'. * tests/gpg/t-cancel.c: Include <sys/select.h> for 'fd_set' and friends. Signed-off-by: Justus Winter <[email protected]>
* tests: Fix blunder.Justus Winter2016-09-271-1/+1
| | | | | | -- Fixes-commit: a423603f Signed-off-by: Justus Winter <[email protected]>
* tests: Fix check for gpg versions not reporting the critical flag.Justus Winter2016-09-271-0/+1
| | | | | | | * lang/python/tests/t-sig-notation.py: Also blacklist 2.0.x. * tests/gpg/t-sig-notation.c: Likewise. Signed-off-by: Justus Winter <[email protected]>
* move some file encodings to UTF-8Daniel Kahn Gillmor2016-09-231-1/+1
| | | | | | | | | | | | | | | * THANKS, doc/ChangeLog-2011, tests/ChangeLog-2011, tests/gpg/geheim.txt: convert from iso 8859-1 to utf-8. * lang/qt/src/dataprovider.cpp, lang/qt/src/qgpgmerefreshkeysjob.cpp, lang/qt/src/qgpgmesecretkeyexportjob.cpp: replace U+FFFD REPLACEMENT CHARACTER with proper U+00E4 LATIN SMALL LETTER A WITH DIAERESIS. -- Note that src/versioninfo.rc.in is still ISO-8859-1. I don't know whether Windows will properly handle UTF-8 in this file or not, so i have not touched it. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* tests: Add test for cancellationDaiki Ueno2016-09-223-2/+276
| | | | | | | | | | * tests/gpg/t-cancel.c: New file. * tests/gpg/Makefile.am (tests_skipped): New variable, default to t-genkey and t-cancel. (noinst_PROGRAMS): Add $(tests_skipped). * tests/gpg/.gitignore: Add t-cancel. Signed-off-by: Daiki Ueno <[email protected]>
* tests: Fix select usage in t-eventloopDaiki Ueno2016-09-221-1/+5
| | | | | | * tests/gpg/t-eventloop.c (do_select): Supply timeout value to select. Signed-off-by: Daiki Ueno <[email protected]>
* tests: Use --batch for gpg import.Werner Koch2016-09-201-3/+3
| | | | | | | | | * lang/python/tests/Makefile.am (./pubring-stamp): Use --batch with GPG to avoid Pinentries during import when using GnuPG >= 2.1. Replace touch by echo. * tests/gpg/Makefile.am (./pubring-stamp): Ditto. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_interact, deprecate gpgme_op_edit.Werner Koch2016-09-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_interact_cb_t): New. (GPGME_INTERACT_CARD): New. (gpgme_op_interact_start, gpgme_op_interact): New. * src/libgpgme.vers, src/gpgme.def: Add new functions. * src/edit.c (op_data_t): Rename fnc to fnc_old and change users. Add fnc. (edit_status_handler): Call old or new callback. (command_handler): Ditto. (interact_start): New. (gpgme_op_interact_start, gpgme_op_interact_start): New. * src/status-table.c (_gpgme_status_to_string): New. * tests/gpg/t-edit.c (edit_fnc): Rename to interact_fnc and change type of STATUS. Use gpgme_io_writen. (main): s/gpgme_op_edit/gpgme_op_interact/. -- This change will eventually allow us to remove all those status codes from gpgme.h. Signed-off-by: Werner Koch <[email protected]>
* tests: Mark lots of unused vars and fix const mismatches.Werner Koch2016-09-1324-142/+199
| | | | Signed-off-by: Werner Koch <[email protected]>
* tests: Use gpgme_io_write in passhrase callbacks.Werner Koch2016-09-131-9/+7
| | | | | | | | * tests/gpg/t-support.h (passphrase_cb): Use gpgme_io_write. * tests/gpgsm/t-support.h (passphrase_cb): Ditto. * tests/run-support.h (passphrase_cb): Ditto. Signed-off-by: Werner Koch <[email protected]>
* tests: Fix version comparison.Justus Winter2016-09-121-2/+2
| | | | | | | * tests/gpg/t-sig-notation.c: Fix version comparison. Fixes-commit: a0263ad2 Signed-off-by: Justus Winter <[email protected]>
* tests: Make signature notation test compatible with older GnuPGs.Justus Winter2016-09-121-2/+30
| | | | | | | | | * lang/python/tests/t-sig-notation.py: Only check the critical flag when GnuPG >= 2.1.13 is used. * tests/gpg/t-sig-notation.c: Likewise. Fixes-commit: c88c9ef3 Signed-off-by: Justus Winter <[email protected]>
* tests: Set passphrase cb in t-encrypt-mixedAndre Heinecke2016-09-061-0/+2
| | | | | | | | * tests/gpg/t-encrypt-mixed.c (main): Set passphrase cb. -- This fixes the test when run without an agent and our faked pinentry program.
* tests: Fix memory leak.Justus Winter2016-08-101-0/+1
| | | | | | * tests/gpg/t-encrypt-mixed.c (main): Free 'text2'. Signed-off-by: Justus Winter <[email protected]>
* core: Add support for mixed symmetric and asym encAndre Heinecke2016-08-092-1/+127
| | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_encrypt_flags_t): New flag GPGME_ENCRYPT_SYMMETRIC. * src/engine-gpg.c (gpg_encrypt): Also add --symmetric if the flag is given. * NEWS: Mention new flag. * tests/run-encrypt.c (show_usage): Extend for --symmetric. (main): Handle --symmetric. (main): Set passphrase_cb in loopback mode. (main): Fix encrypt call if no recipients are given. * tests/gpg/t-encrypt-mixed.c: New. * tests/gpg/Makefile.am (c_tests): Add new test. * doc/gpgme.texi: Document new flag.
* tests: Fix trivial memory leaks.Justus Winter2016-06-275-5/+11
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* tests: Fix notation tests.Justus Winter2016-06-011-3/+3
| | | | | | | | | * lang/python/tests/t-sig-notation.py (check_result): Check critical flag. * tests/gpg/t-sig-notation.c (check_result): Likewise. Fixes-commit: 1cacd7d0 Signed-off-by: Justus Winter <[email protected]>
* tests: Fix test.Justus Winter2016-05-271-1/+1
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* Trailing white space cleanup for 2 files in tests/.Werner Koch2016-05-172-26/+25
| | | | --
* Fix test suite for GnuPG 2.1 which uses pubring.kbx.Werner Koch2015-06-084-55/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgsm/final.test: New. * tests/gpgsm/initial.test: New. * tests/gpg/start-stop-agent: Move to ../. * tests/gpgsm/Makefile.am (TESTS_ENVIRONMENT): Export top_srcdir. (TESTS): Add intial.test and final.test. (AM_LDFLAGS): Add -no-install. (clean-local): Use start-stop-agent (initial.test): Add dependency. * tests/gpg/Makefile.am (top_srcdir): Export top_srcdir. (AM_LDFLAGS): Add -no-install. (check-local): Depend on pubring-stamp instead of pubring.gpg. (initial.test): Depend on check-local. (./pubring-gpg): Replace by rule for ./pubring-stamp. -- There are also a couple of other changes which should make the tests a bit more robust and the gpg and gpgsm tests more similar. The -no-install avoids creating wrappers for test programs, which make debugging easier. The dependency on check-local guarantees that its rules are run before the first test. This is important because conf files are setup by this rule. Earlier automake versions seem to have run check-local always before the tests but today the order of execution is not defined. Signed-off-by: Werner Koch <[email protected]>
* Switch to automake 1.14 and update build-aux files.Werner Koch2015-01-301-3/+1
| | | | Signed-off-by: Werner Koch <[email protected]>
* tests: Delay some test file extraction until "make check".Werner Koch2014-09-241-1/+1
| | | | | * tests/gpg/Makefile.am (all-local): Change to check-local. * tests/gpgsm/Makefile.am (all-local): Ditto.
* Clean up gpgme's tests/gpg when gpg2.1 is availableDaniel Kahn Gillmor2014-09-242-1/+2
| | | | | | | * tests/gpg/Makefile.am: Clean up .gpg-v21-migrated -- We also need to gitignore this file.
* Remove compiler warning from testWerner Koch2014-04-101-12/+9
| | | | --
* Locate engine names only at runtime and prefer GnuPG-2.Werner Koch2013-12-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (NEED_GPG_VERSION, NEED_GPGSM_VERSION) (NEED_G13_VERSION, NEED_GPGCONF_VERSION): Remove vars and all related checks. Do not check for any engine version. (HAVE_ASSUAN): Remove AM conditional. * src/Makefile.am: Remove separate component vars and always build all engines but uiserver. * src/dirinfo.c (WANT_GPGCONF_NAME): New. (struct dirinfo): Add field gpgconf_name. (_gpgme_get_default_gpgconf_name): Use WANT_GPGCONF_NAME. (get_gpgconf_item): Set gpgconf name and adjust for _gpgme_get_*_path now returning a malloced string. * src/engine.c (engine_ops): Always init all engines except for uiserver. * src/posix-util.c (_gpgme_get_gpgsm_path, _gpgme_get_g13_path): Remove unused functions. (walk_path): New. (_gpgme_get_gpg_path, _gpgme_get_gpgconf_path ): Re-implement using walk_path. * src/w32-util.c (_gpgme_get_gpgsm_path, _gpgme_get_g13_path): Remove unused functions. (_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Return a malloced string. * src/engine-g13.c (g13_get_req_version): Use a hardwired string with the required version. This info belongs into this file. * src/engine-gpg.c (gpg_get_req_version): Ditto. * src/engine-gpgconf.c (gpgconf_get_req_version): Ditto. * src/engine-gpgsm.c (gpgsm_get_req_version): Ditto. * tests/t-engine-info.c: Replace now useless test by an info output. * tests/gpg/Makefile.am (GPG, GPG_AGENT): Hardwire gpg and gpg-agent. * tests/gpgsm/Makefile.am (GPGSM): Hardwire gpgsm. Signed-off-by: Werner Koch <[email protected]>
* Make test suite workable with GnuPG 2.1.Werner Koch2013-08-129-13/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpg/start-stop-agent: New. * tests/gpg/initial.test: New. * tests/gpg/final.test: New. * tests/gpg/Makefile.am (c_tests): New. (TESTS): Move all to c_tests. Add initial.test, final.test, and c_tests. (TESTS_ENVIRONMENT): Add C_ALL=C (private_keys): New. (EXTRA_DIST): Add new files. (./private-keys-v1.d/gpg-sample.stamp): Copy private keys. (all-local): Depend on gpg-sample.stamp. * tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F: New. * tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD: New. * tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66: New. * tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C: New. * tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New. -- GnuPG 2.1 requires that the agent knows the private keys. Thus we need to install them. The code should still work with GnuPG < 2.1. To make the whole testing using a agent more robust, the way to start the agent has also be changed.
* Allow symmetric encryption with gpgme_op_encrypt_sign.Werner Koch2013-05-221-5/+23
| | | | | | | | | | | * src/encrypt-sign.c (encrypt_sym_status_handler): New. (encrypt_sign_start): Handle recp == NULL case. * src/engine-gpg.c (gpg_encrypt_sign): Implement symmetric encryption. * tests/gpg/t-encrypt-sign.c (main): Add a test case for this. -- Co-authored-by: Kyle L. Huff <[email protected]> GnuPG-bug-id: 1440
* .gitignore: flesh out rules and add subdirectory-.gitignores.W. Trevor King2012-04-201-0/+30
|
* Use gpgme interface for error handling to avoid linking with gpg-error.Marcus Brinkmann2012-02-089-18/+14
| | | | | | | | | | | * tests/t-data.c, tests/run-export.c, tests/run-keylist.c, tests/run-support.h, tests/run-verify.c, tests/gpg/t-decrypt-verify.c, tests/gpg/t-edit.c, tests/gpg/t-eventloop.c, tests/gpg/t-keylist-sig.c, tests/gpg/t-keylist.c, tests/gpg/t-support.h, tests/gpg/t-trustlist.c, tests/gpg/t-verify.c, tests/gpg/t-wait.c, tests/gpgsm/cms-decrypt.c, tests/gpgsm/cms-keylist.c, tests/gpgsm/t-keylist.c, tests/gpgsm/t-support.h, tests/gpgsm/t-verify.c, tests/opassuan/t-command.c: Use gpgme interface for gpg-error functions.
* Link the thread test to pthread.Marcus Brinkmann2012-02-081-1/+1
| | | | * tests/gpg/Makefile.am (t_thread1_LDADD): Add -lpthread.
* Clean up the tests correctly.Marcus Brinkmann2011-05-111-3/+4
|
* Make sure an existing agent doesn't interfere with test suite generation.Marcus Brinkmann2011-05-061-0/+3
|
* Improve import tests for GnuPG 2.1.Marcus Brinkmann2011-05-031-1/+4
|
* Update GPGME test suite for use with GnuPG 2.1.Marcus Brinkmann2011-04-277-746/+108
|
* Fix detection of invalid signer keys.Werner Koch2009-08-061-0/+11
| | | | | Support the new INV_SGNR status code.
* Move gpg test programs to the top test directory.Werner Koch2009-07-074-515/+1
|
* 2009-06-22 Marcus Brinkmann <[email protected]>Marcus Brinkmann2009-06-221-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add AC_TYPE_UINTPTR_T. * assuan/assuan.h [_ASSUAN_IN_GPGME_BUILD_ASSUAN]: Declare _gpgme_io_connect. src/ 2009-06-22 Marcus Brinkmann <[email protected]> * debug.h: Everywhere, use %p instead of 0x%x to print pointer. [HAVE_STDINT_H]: Include <stdint.h>. (_TRACE, TRACE, TRACE0, TRACE1, TRACE2, TRACE3, TRACE6): Cast tag to (uintptr_t) before casting it to (void*) to silence GCC warning. * gpgme.h.in (_GPGME_DEPRECATED_OUTSIDE_GPGME): New macro. * sign.c (_GPGME_IN_GPGME): Define it. * keylist.c (_GPGME_IN_GPGME): Define it. * debug.c (_gpgme_debug_begin, _gpgme_debug_add): Handle error in vasprintf and asprintf. * priv-io.h: Include <sys/socket.h>. Declare _gpgme_io_connect. tests/ 2009-06-22 Marcus Brinkmann <[email protected]> * gpg/t-support.h (passphrase_cb): Implement write() according to the book to silence compiler warning. * gpgsm/t-support.h (passphrase_cb): Likewise.
* Add support for gpg --fetch-keys.Werner Koch2009-06-165-69/+191
|
* Add new functions to import and export keys specified by gpgme_key_t.Werner Koch2009-06-164-1/+481
| | | | | Allow exporting keys to a keyserver.
* Add gpgme_io_write and gpgme_io_read.Werner Koch2009-06-093-6/+7
| | | | | Minor cleanups.
* * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Specify --with-gpg.Moritz Schulte2009-04-192-6/+11
| | | | | | | | | | | | * gpg/Makefile.am (EXTRA_DIST): Replaced mkdemodirs with mkdemodirs.in. (mkdemodirs): New target. (clean-local): Added command for removing mkdemodirs script. (./Alpha/Secret.gpg): Added dependency on mkdemodirs. * gpg/mkdemodirs: Renamed to ... * gpg/mkdemodirs.in: ... here. * gpg/mkdemodirs.in (GPG): Derive value from @GPG@ instead of hard-coding "gpg".
* Provide inforation about smartcards.Werner Koch2009-02-041-0/+20
|
* 2008-12-03 Marcus Brinkmann <[email protected]>Marcus Brinkmann2008-12-031-1/+1
| | | | | | * Makefile.am (INCLUDES): Fix path to include file. * gpg/Makefile.am (INCLUDES), gpgsm/Makefile.am (INCLUDES): Likewise.
* 008-11-03 Marcus Brinkmann <[email protected]>Marcus Brinkmann2008-11-031-3/+3
| | | | | | | | | | | | | | | | | | | | * configure.ac: Replace gpgme paths with src. * gpgme: Move to ... * src: ... this new directory. assuan/ 2008-11-03 Marcus Brinkmann <[email protected]> * Makefile.am (INCLUDES): Replace gpgme path with src. tests/ 2008-11-03 Marcus Brinkmann <[email protected]> * gpgsm/Makefile.am (INCLUDES, LDADD): Replace gpgme path with src. * gpg/Makefile.am (INCLUDES, LDADD, t_thread1_LDADD): Likewise. * Makefile.am (LDADD): Likewise.
* Add example.Werner Koch2008-06-191-1/+5
| | | | | Update gpgconf test.
* 2008-01-28 Marcus Brinkmann <[email protected]>Marcus Brinkmann2008-01-281-1/+1
| | | | | * gpg/Makefile.am (DISTCLEANFILES): Add pubring.kbx~.
* 2008-01-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann2008-01-101-8/+16
| | | | | * gpg/t-gpgconf.c (main): Allow for dirmngr not to be available.
* 2008-01-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann2008-01-101-1/+1
| | | | | * gpg/Makefile.am (./gpg-agent.conf): Correct pinentry path.