aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpg (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-08-10tests: Fix memory leak.Justus Winter1-0/+1
* tests/gpg/t-encrypt-mixed.c (main): Free 'text2'. Signed-off-by: Justus Winter <[email protected]>
2016-08-09core: Add support for mixed symmetric and asym encAndre Heinecke2-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.
2016-06-27tests: Fix trivial memory leaks.Justus Winter5-5/+11
-- Signed-off-by: Justus Winter <[email protected]>
2016-06-01tests: Fix notation tests.Justus Winter1-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]>
2016-05-27tests: Fix test.Justus Winter1-1/+1
-- Signed-off-by: Justus Winter <[email protected]>
2016-05-17Trailing white space cleanup for 2 files in tests/.Werner Koch2-26/+25
--
2015-06-08Fix test suite for GnuPG 2.1 which uses pubring.kbx.Werner Koch4-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]>
2015-01-30Switch to automake 1.14 and update build-aux files.Werner Koch1-3/+1
Signed-off-by: Werner Koch <[email protected]>
2014-09-24tests: Delay some test file extraction until "make check".Werner Koch1-1/+1
* tests/gpg/Makefile.am (all-local): Change to check-local. * tests/gpgsm/Makefile.am (all-local): Ditto.
2014-09-24Clean up gpgme's tests/gpg when gpg2.1 is availableDaniel Kahn Gillmor2-1/+2
* tests/gpg/Makefile.am: Clean up .gpg-v21-migrated -- We also need to gitignore this file.
2014-04-10Remove compiler warning from testWerner Koch1-12/+9
--
2013-12-27Locate engine names only at runtime and prefer GnuPG-2.Werner Koch1-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]>
2013-08-12Make test suite workable with GnuPG 2.1.Werner Koch9-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.
2013-05-22Allow symmetric encryption with gpgme_op_encrypt_sign.Werner Koch1-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
2012-04-20.gitignore: flesh out rules and add subdirectory-.gitignores.W. Trevor King1-0/+30
2012-02-08Use gpgme interface for error handling to avoid linking with gpg-error.Marcus Brinkmann9-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.
2012-02-08Link the thread test to pthread.Marcus Brinkmann1-1/+1
* tests/gpg/Makefile.am (t_thread1_LDADD): Add -lpthread.
2011-05-11Clean up the tests correctly.Marcus Brinkmann1-3/+4
2011-05-06Make sure an existing agent doesn't interfere with test suite generation.Marcus Brinkmann1-0/+3
2011-05-03Improve import tests for GnuPG 2.1.Marcus Brinkmann1-1/+4
2011-04-27Update GPGME test suite for use with GnuPG 2.1.Marcus Brinkmann7-746/+108
2009-08-06Fix detection of invalid signer keys.Werner Koch1-0/+11
Support the new INV_SGNR status code.
2009-07-07Move gpg test programs to the top test directory.Werner Koch4-515/+1
2009-06-222009-06-22 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-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.
2009-06-16Add support for gpg --fetch-keys.Werner Koch5-69/+191
2009-06-16Add new functions to import and export keys specified by gpgme_key_t.Werner Koch4-1/+481
Allow exporting keys to a keyserver.
2009-06-09Add gpgme_io_write and gpgme_io_read.Werner Koch3-6/+7
Minor cleanups.
2009-04-19* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Specify --with-gpg.Moritz Schulte2-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".
2009-02-04Provide inforation about smartcards.Werner Koch1-0/+20
2008-12-032008-12-03 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+1
* Makefile.am (INCLUDES): Fix path to include file. * gpg/Makefile.am (INCLUDES), gpgsm/Makefile.am (INCLUDES): Likewise.
2008-11-03008-11-03 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-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.
2008-06-19Add example.Werner Koch1-1/+5
Update gpgconf test.
2008-01-282008-01-28 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+1
* gpg/Makefile.am (DISTCLEANFILES): Add pubring.kbx~.
2008-01-102008-01-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-8/+16
* gpg/t-gpgconf.c (main): Allow for dirmngr not to be available.
2008-01-102008-01-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+1
* gpg/Makefile.am (./gpg-agent.conf): Correct pinentry path.
2008-01-102008-01-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann2-3/+29
* gpg/pinentry: New file. * gpg/Makefile.am (DISTCLEANFILES, all-local): Add gpg-agent.conf (./gpg-agent.conf): New target. (EXTRA_DIST): Add pinentry.
2008-01-102008-01-10 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+5
* gpg/t-gpgconf.c (main): Exit early if compiled without gpgconf.
2008-01-042008-01-04 Marcus Brinkmann <[email protected]>gpgme-1.1.6Marcus Brinkmann1-1/+1
* gpg/Makefile.am (CLEANFILES): Add pubring.kbx and dirmngr.conf.
2008-01-042008-01-04 Marcus Brinkmann <[email protected]>Marcus Brinkmann2-3/+308
* configure.ac: Support gpgconf. gpgme/ 2008-01-04 Marcus Brinkmann <[email protected]> * Makefile.am (gpgconf_components): New variable. (main_sources): Add gpgconf.c. * gpgme.h (gpgme_protocol_t): New protocol GPGME_PROTOCOL_GPGCONF. (gpgme_conf_level_t, gpgme_conf_type_t, gpgme_conf_arg_t) (gpgme_conf_opt_t, gpgme_conf_comp_t, gpgme_conf_arg_new) (gpgme_conf_arg_release, gpgme_conf_opt_change) (gpgme_conf_release, gpgme_op_conf_load, gpgme_op_conf_save): New types. * gpgconf.c, engine-gpgconf.c: New files. * engine.h: (_gpgme_engine_op_conf_load, (_gpgme_engine_op_conf_save): New prototypes. * op-support.c (_gpgme_op_reset): Ignore not implemented locale function. * posix-util.c (_gpgme_get_gpgconf_path): New function. * w32-util.c (_gpgme_get_gpgconf_path): New function. * engine-gpgsm.c: (_gpgme_engine_ops_gpgsm): Add stubs for conf_load and conf_save. * rungpg.c: (_gpgme_engine_ops_gpg): Add stubs for conf_load and conf_save. * gpgme.def: Add new gpgconf related interfaces. * libgpgme.vers: Likewise. * util.h (_gpgme_get_gpgconf_path): New prototype. * gpgme.h (gpgme_protocol_t): Add GPGME_PROTOCOL_GPGCONF. * engine-backend.h (_gpgme_engine_ops_gpgconf): New prototype. (struct engine_ops): Add members for conf_load and conf_save. * engine.c (engine_ops): Add _gpgme_engine_ops_gpgconf. (_gpgme_engine_op_conf_load, (_gpgme_engine_op_conf_save): New functions. (gpgme_get_engine_info): Allow protocol GPGME_PROTOCOL_GPGCONF. tests/ 2008-01-04 Marcus Brinkmann <[email protected]> * Makefile.am (TESTS_ENVIRONMENT): Use absolute path for GNUPGHOME. * gpg/Makefile.am (TESTS_ENVIRONMENT): Use absolute path for GNUPGHOME. * gpgsm/Makefile.am (TESTS_ENVIRONMENT): Use absolute path for GNUPGHOME. * gpg/Makefile.am (TESTS): Add t-gpgconf. t-gpgconf.c: New file.
2007-09-272007-09-27 Marcus Brinkmann <[email protected]>Marcus Brinkmann3-6/+26
* assuan-pipe-connect.c (pipe_connect_gpgme): Do not close process handle here. Use this function also on Unix systems. gpgme/ 2007-09-27 Marcus Brinkmann <[email protected]> * w32-glib-io.c (_gpgme_io_spawn), w32-qt-io.cpp (_gpgme_io_spawn), w32-io.c (_gpgme_io_spawn): Close the process handle, return 0. tests/ 2007-09-27 Marcus Brinkmann <[email protected]> * t-engine-info.c (check_engine_info): Fix debug output. * gpg/Makefile.am (tests_unix): New variable. (TESTS): Use it. * gpg/t-support.h (passphrase_cb) [HAVE_W32_SYSTEM]: Use WriteFile instead of write. * gpg/t-wait.c [HAVE_W32_SYSTEM]: Define sleep as _sleep.
2007-02-26Detect and bailo out on double plaintext messages.Werner Koch1-0/+31
2005-12-06 * Fixed a bug in that the fingerprints of subkeys are not available.Werner Koch2-7/+5
* Clarified usage of the SECRET flag in key listings. It is now reset for stub keys.
2005-10-19Add a test for expired subkeysWerner Koch3-884/+914
2005-10-062005-10-07 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-2/+2
* gpg/t-sig-notation.c: Change critical notation to something GnuPG understands.
2005-10-012005-10-01 Marcus Brinkmann <[email protected]>Marcus Brinkmann2-31/+9
* gpg/Makefile.am (EXTRA_DIST): Remove gpg.conf. (DISTCLEANFILES): Add gpg.conf. (all-local): Add gpg.conf. (./gpg.conf): New target. * gpg/gpg.conf: Remove file.
2005-10-012005-10-01 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+1
* gpg/Makefile.am (EXTRA_DIST): Add gpg.conf.
2005-10-01doc/Marcus Brinkmann4-4/+201
2005-10-01 Marcus Brinkmann <[email protected]> * gpgme.texi (Signature Notation Data): New section. (Verify): Added more about the notation data structure. gpgme/ 2005-10-01 Marcus Brinkmann <[email protected]> * gpgme.def: Add gpgme_data_set_file_name, gpgme_data_get_file_name, gpgme_sig_notation_clear, gpgme_sig_notation_add and gpgme_sig_notation_get. * libgpgme.vers: Add gpgme_sig_notation_clear, gpgme_sig_notation_add and gpgme_sig_notation_get. * Makefile.am (libgpgme_real_la_SOURCES): Add sig-notation.c. * context.h (struct gpgme_context): New field sig_notations. * gpgme.h (struct _gpgme_sig_notation): New member value_len and critical. (GPGME_SIG_NOTATION_CRITICAL): New symbol. (gpgme_sig_notation_flags_t): New type. (gpgme_sig_notation_add, gpgme_sig_notation_clear, gpgme_sig_notation_get): New prototypes. * ops.h (_gpgme_sig_notation_create, _gpgme_sig_notation_free): New prototypes. * sig-notation.c (_gpgme_sig_notation_free): New file. * verify.c (parse_notation): Use support functions. (release_op_data): Likewise. * rungpg.c (append_args_from_sig_notations): New function. (gpg_encrypt_sign, gpg_sign): Call it. tests/ 2005-10-01 Marcus Brinkmann <[email protected]> * gpg/Makefile.am (TESTS): Add t-sig-notation. * gpg/t-sig-notation.c (check_result): New file. * gpg/t-verify.c (check_result): Also check the length of the notation data. * gpg/gpg.conf: New file.
2005-09-30doc/Marcus Brinkmann2-1/+101
2005-09-30 Marcus Brinkmann <[email protected]> * gpgme.texi (Data Buffer I/O Operations, Data Buffer Meta-Data): New subsections. gpgme/ 2005-09-30 Marcus Brinkmann <[email protected]> * data.h (struct gpgme_data): New member file_name. * data.c (gpgme_data_set_filename): New function. (_gpgme_data_release): Free DH->filename if necessary. (gpgme_data_get_filename): New function. * rungpg.c (gpg_encrypt): Set filename option. (gpg_encrypt_sign): Likewise. (gpg_sign): Likewise. * libgpgme.vers (GPGME_1.1): Add gpgme_data_set_file_name and gpgme_data_get_file_name. tests/ 2005-09-30 Marcus Brinkmann <[email protected]> * gpg/Makefile.am (TESTS): Add t-filename. * gpg/t-filename.c: New file.
2005-09-23Boosted performance of w32 I/OWerner Koch3-1/+146
2005-06-02gpgme/Marcus Brinkmann2-2/+74
2005-06-03 Marcus Brinkmann <[email protected]> * wait-global.c (gpgme_wait): Break out of the fd processing loop after an error. Reported by Igor Belyi <[email protected]>. tests/ 2005-06-03 Marcus Brinkmann <[email protected]> * gpg/Makefile.am (TESTS): Add t-wait. * gpg/t-wait.c (main): New test.