summaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* w32: Prepare for the case gcrypt.h will not include winsock2.h.NIIBE Yutaka2021-12-171-0/+4
| | | | | | | | | | | | | | | * common/dynload.h: Include specific headers only. * common/exechelp-w32.c: Include <windows.h>. * common/gettime.c: Likewise. * common/utf8conv.c: Likewise. * tests/gpgscm/ffi.c: Likewise. * tools/gpgconf.c: Likewise. * configure.ac: Check winsock2.h, removing gl_HEADER_SYS_SOCKET. -- GnuPG-bug-id: 5731 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tests: New way to make use of gpgconf.ctl in tests.Werner Koch2021-10-128-55/+25
| | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (all-local): New to setup symlinks. (distclean-local): New. * tests/Makefile.am: Remove the gpgconf related targets. Just keep gpgconf.ctl.in in EXTRA_DIST * tests/cms/Makefile.am (GNUPG_BUILD_ROOT): * tests/gpgme/Makefile.am (GPGSCM_PATH): * tests/openpgp/Makefile.am (GNUPG_BUILD_ROOT): * tests/pkits/Makefile.am (GNUPG_BUILD_ROOT): * tests/tpm2dtests/defs.scm (tools): Revert to the former values. * tests/openpgp/defs.scm (tools): Ditto. -- This Fixes-commit: 399ebf6d873d4178c1d527aa4df34bf16a76360e Fixes-commit: 84fcd8e6eb7e0786399e1f6461c3f60b0db2d070 because we ran into problems with the idea of first doing a test-install for the checks. "make distcheck" turned out to be too problematic. Symlinks are a better way of doing this. Also fixes GnuPG-bug-id: 5634
* tests: Use the new gpgconf.ctl based method.Werner Koch2021-10-013-46/+33
| | | | | | | | | | | | | * tests/openpgp/defs.scm: We expect that stuff is now installed. (tools): Fix the names. (intsalled?, bin-prefix): Remove. (tool-hardcoded): Simplify. (gpg-conf'): Simplify. (GNUPG_BUILDDIR): Do not anymore set this envvar. * tests/tpm2dtests/defs.scm: Ditto. -- This simplifies things a bit.
* build: Prepare for using installed versions for tests.Werner Koch2021-10-018-3/+51
| | | | | | | | | | | | | | | | | | | | | | | * tests/gpgconf.ctl.in: New. * tests/Makefile.am (EXTRA_DIST): Add new file. (TESTINST_DIRS): New. (clean-local): New. (clean-local-testinst): New. (check-recursive): New hook. (bin/gpgconf.ctl): Run a test install. * tests/cms/Makefile.am (TESTS_ENVIRONMENT): Set new envvar GNUPG_BUILD_ROOT. * tests/gpgme/Makefile.am (TESTS_ENVIRONMENT): Ditto. * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Ditto. * tests/pkits/Makefile.am (TESTS_ENVIRONMENT): Ditto. * tests/tpm2dtests/Makefile.am (TESTS_ENVIRONMENT): Ditto. -- Right now this helps only with the global configuraion dir which is now not set and thus the build host'ss own /etc/gnupg does not anymore affect the build. Signed-off-by: Werner Koch <wk@gnupg.org>
* common: Allow for GCM decryption in de-vs mode.Werner Koch2021-06-022-1/+1
| | | | | | | | | | | * common/compliance.c (gnupg_cipher_is_allowed): Allow GCM for gpgsm in decrypt mode. * tests/cms/samplemsgs/pwri-sample.gcm.p7m: Remove duplicated authtag -- We allow GCM in de-vs mode for decryption although this has not been evaluation. It is decryption and thus no serious harm may happen.
* sm: Support AES-GCM decryption.Werner Koch2021-06-025-0/+10
| | | | | | | | | | | | * tests/cms/samplemsgs/: Add sample messages. * sm/gpgsm.c (main): Use gpgrt_fcancel on decryption error. * sm/decrypt.c (decrypt_gcm_filter): New. (gpgsm_decrypt): Use this filter if requested. Check authtag. -- Note that the sample message pwri-sample.gcm.p7m is broken: The authtag is duplicated to the authEncryptedContentInfo. I used a temporary code during testing hack to that test message out.
* tests: Rename subdir gpgsm to cms and move sample dirs.Werner Koch2021-05-3169-70/+67
| | | | | | | -- It does not make sense to have the cms stuff at the top level but the openpgp at a dedicated directory. This patch fixes that.
* tests: Make sure that the build keyboxd is used.Werner Koch2021-04-221-0/+1
| | | | | | | * tests/openpgp/defs.scm (create-gpghome): Add keyboxd-program. -- GnuPG-bug-id: 5406
* gpg,gpgsm: Move use-keyboxd to the new conf file common.confWerner Koch2021-04-192-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/comopt.c, common/comopt.h: New. * common/Makefile.am: Add them. * g10/gpg.c: Include comopt.h. (main): Also parse common.conf. * sm/gpgsm.c: Include comopt.h. (main): Set a flag for the --no-logfile option. Parse common.conf. * tools/gpgconf-comp.c (known_options_gpg): Remove "use-keyboxd", add pseudo option "use_keyboxd". (known_pseudo_options_gpg): Add pseudo option "use_keyboxd". (known_options_gpgsm): Remove "use-keyboxd". * tests/openpgp/defs.scm (create-gpghome): Create common.conf. * doc/examples/common.conf: New. -- Note that --use-keybox still works but prints a warning. We will eventually remove this option becuase it was marked as an experimental feature anyway. It would be too confusing if gpg and gpgsm use different key storages. Further, other components (e.g. dirmngr or gpg-wks-client) which call gpg or gpgsm need to be aware that the keyboxd is used and pass that option on the command line. Now that common.conf is always read (even if --no-options is used) those tools will work instantly.
* tests: Make sure the built keyboxd is used by the tests.Werner Koch2021-03-262-2/+2
| | | | | | | * tests/openpgp/defs.scm (tool): Add keyboxd. * tests/openpgp/setup.scm: Ditto. Signed-off-by: Werner Koch <wk@gnupg.org>
* build: Fix distcheck when tpm2dtests are run.Damien Goutte-Gattat via Gnupg-devel2021-03-161-2/+3
| | | | | | | * tests/tpm2dtests/Makefile.am (EXTRA_DIST): Distribute test files. (CLEANFILES): Make sure to remove log files. Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
* tests:tpm2d: add missing start_sw_tpm.sh scriptJames Bottomley2021-03-152-1/+36
| | | | | | | | | | | | | | | * tests/tpm2dtests/start_sw_tpm.sh: New. * tests/tpm2dtests/Makefile.am: Add. -- This accidentally got left out of the initial commit for testing 6720f1343 ("tpm2d: add tests for the tpm2daemon") Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Added to Makefile and wrote tiny ChangeLog. Signed-off-by: Werner Koch <wk@gnupg.org>
* tpm2d: add tests for the tpm2daemonJames Bottomley2021-03-1011-1/+882
| | | | | | | | | | | | | | | | | | | | | * configure.ac: Detect TPM emulator and enable tests. * tests/tpm2dtests/: New test suite. * tests/Makefile.am: Run tests. -- Add a set of tests that exercise tpm2daemon handling of keys and verify compatibility with non-tpm based keys. Running this test infrastructure requires a tpm emulator, which is tested for during configuration. If an emulator is not found, the tests won't be run since they require the presence of a TPM (although the TPM handling code will still be built). Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> - Fixed tests/Makefile.am for make distcheck. Signed-off-by: Werner Koch <wk@gnupg.org>
* gpg: Do not allow old cipher algorithms for encryption.Werner Koch2021-02-101-0/+1
| | | | | | | | | | | | | | | | | | | * g10/gpg.c: New option --allow-old-cipher-algos. (set_compliance_option): Set --rfc4880bis explictly to SHA256 and AES256. Allow old cipher algos for OpenPGP, rfc4880, and rfc2440. * g10/options.h (opt): Add flags.allow_old_cipher_algos. * g10/misc.c (print_sha1_keysig_rejected_note): Always print the note unless in --quiet mode. * g10/encrypt.c (setup_symkey): Disallow by default algos with a blocklengt < 128. (encrypt_crypt): Ditto. Fallback by default to AES instead of 3DES. * g10/pkclist.c (algo_available): Take care of old cipher also. (select_algo_from_prefs): Use AES as implicit algorithm by default. * tests/openpgp/defs.scm (create-gpghome): Set allow-old-cipher-algos. -- GnuPG-bug-id: 3415
* tests: Improve handling of spaces in $PATHWerner Koch2020-10-045-14/+14
| | | | | | | -- Signed-off-by: Werner Koch <wk@gnupg.org> (cherry picked from commit b2590f2e47fe8ab7352a9e3769b195ff9f398dd7)
* tests: Integrate --use-keyboxd into the OpenPGP test suite.Werner Koch2020-09-244-12/+37
| | | | | | | | | | | * tests/openpgp/all-tests.scm (all-tests): Replace extended-key-format mode with a new keyboxd mode. * tests/openpgp/defs.scm (create-gpghome): Ditto. * tests/openpgp/gpgv.scm: Adjust for keyboxd mode. * tests/openpgp/issue2419.scm: Fix to allow setting a log-file into gpg.conf for debugging. Signed-off-by: Werner Koch <wk@gnupg.org>
* tests: Fix convenience function to run gpg.Werner Koch2020-09-241-1/+1
| | | | | | | | | | | | | | * tests/openpgp/defs.scm (pipe:gpg): Remove stray dash. -- The extra dash is problematic at export and import because this does not export a single key as intended by the tests but does two key lookups where the second fails because that userid is always "-". For the current keyring and keybox code this does not matter because it is ignored. The keyboxd code however is more picky and returns an error. Fixes-commit: 9609cb20e4caee739b9fc4fd36797029d2970041 Signed-off-by: Werner Koch <wk@gnupg.org>
* tests: New test run envvar to run gpg under valgrind.Werner Koch2020-09-042-1/+14
| | | | | | | | | -- Take care: Running under valgrind takes loooong and in some case you may run into an valgrind internal error. Signed-off-by: Werner Koch <wk@gnupg.org>
* build: New configure option --disable-testsWerner Koch2020-08-201-1/+1
| | | | | | | | * configure.ac: Add option --disable-tests. Print warnings in the summary. (DISABLE_TESTS): New am_conditional. -- GnuPG-bug-id: 4960
* gpg: Add regular expression support.NIIBE Yutaka2020-04-031-4/+0
| | | | | | | | | | | | | | | | | * AUTHORS, COPYING.other: Update. * Makefile.am (SUBDIRS): Add regexp sub directory. * configure.ac (DISABLE_REGEX): Remove. * g10/Makefile.am (needed_libs): Add libregexp.a. * g10/trustdb.c: Remove DISABLE_REGEX support. * regexp/LICENSE, regexp/jimregexp.c, regexp/jimregexp.h, regexp/utf8.c, regexp/utf8.h: New from Jim Tcl. * regexp/UnicodeData.txt: New from Unicode. * regexp/Makefile.am, regexp/parse-unidata.awk: New. * tests/openpgp/Makefile.am: Remove DISABLE_REGEX support. * tools/Makefile.am: Remove DISABLE_REGEX support. GnuPG-bug-id: 4843 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* gpgconf: Further simplify the gpgconf option processing.Werner Koch2020-03-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/gc-opt-flags.h (GC_OPT_FLAG_RUNTIME): Move to ... * tools/gpgconf-comp.c: here. (known_options_scdaemon): Remove "options". (known_options_dirmngr): Remove "options". (known_options_gpgsm): Remove "options". (known_options_gpg): Remove "options" and "keyserver". (struct gc_option_s): Rename active t gpgconf_list. (gc_component_list_options): Do not act upon active. (option_check_validity): Ditto. (is_known_option): Make it work correctly for unknown options. (retrieve_options_from_program): Use renamed flag gpgconf_list only to detect duplicated items from --gpgconf-list. Do not set runtime. Only e set the options if set by --gpgconf-list; never clear them. * agent/gpg-agent.c: Simplify the --gpgconf-list output. * dirmngr/dirmngr.c: Ditto. * g10/gpg.c: Ditto. * kbx/keyboxd.c: Ditto. * scd/scdaemon.c: Ditto. * sm/gpgsm.c: Ditto. * tests/openpgp/gpgconf.scm: Use "compliance" instead of "keyserver" for the string arg test. -- There is no need to read the list of options from the components unless they convey a default value. It is better to consult only the list we have in gpgconf-comp.c to decide on whether an option should be displayed. Right, this might mess up thing if a newer gpgconf version is used with an older component, but we already print warnings in this case and in general we do not want to support this anymore - the times of gpg 1.4. and 2.0 are long over now. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <wk@gnupg.org>
* Remove the now obsolete argparse code.Werner Koch2020-02-221-13/+10
| | | | | | | | | * tests/gpgscm/main.c: Switch to the new option parser. * common/argparse.c, common/argparse.h: Remove. * common/init.c (_init_common_subsystems): Do not call obsolete func. * common/Makefile.am (common_sources): Remove those files. Signed-off-by: Werner Koch <wk@gnupg.org>
* gpg: Use gpgrt's new option parser to provide a global conf file.Werner Koch2020-02-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | * common/util.h: Remove argparse.h. * common/argparse.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS. * configure.ac (GPGRT_ENABLE_ARGPARSE_MACROS): Define. * agent/gpg-agent.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS and include argparse.h. Do this also for all main modules which use our option parser except for gpg. Replace calls to strusage by calls to gpgrt_strusage everywhere. * g10/gpg.c (opts): Change type to gpgrt_opt_t. Flag oOptions and oNoOptions with ARGPARSE_conffile and ARGPARSE_no_conffile. (main): Change type of pargs to gpgrt_argparse_t. Rework the option parser to make use of the new gpgrt_argparser. -- This is not yet finished but a make check works. gpg has the most complex and oldest option handling and thus this is the first migration target. SE-Linux checks and version-ed config files are missing and will be added later. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <wk@gnupg.org>
* Spelling cleanup.Daniel Kahn Gillmor2020-02-192-2/+2
| | | | | | | | | | | | | | | | No functional changes, just fixing minor spelling issues. --- Most of these were identified from the command line by running: codespell \ --ignore-words-list fpr,stati,keyserver,keyservers,asign,cas,iff,ifset \ --skip '*.po,ChangeLog*,help.*.txt,*.jpg,*.eps,*.pdf,*.png,*.gpg,*.asc' \ doc g13 g10 kbx agent artwork scd tests tools am common dirmngr sm \ NEWS README README.maint TODO Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* tests: Add a first v5 sample keyWerner Koch2019-03-203-0/+42
| | | | --
* gpg: Avoid importing secret keys if the keyblock is not valid.Werner Koch2019-03-152-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keydb.h (struct kbnode_struct): Replace unused field RECNO by new field TAG. * g10/kbnode.c (alloc_node): Change accordingly. * g10/import.c (import_one): Add arg r_valid. (sec_to_pub_keyblock): Set tags. (resync_sec_with_pub_keyblock): New. (import_secret_one): Change return code to gpg_error_t. Return an error code if sec_to_pub_keyblock failed. Resync secret keyblock. -- When importing an invalid secret key ring for example without key binding signatures or no UIDs, gpg used to let gpg-agent store the secret keys anyway. This is clearly a bug because the diagnostics before claimed that for example the subkeys have been skipped. Importing the secret key parameters then anyway is surprising in particular because a gpg -k does not show the key. After importing the public key the secret keys suddenly showed up. This changes the behaviour of GnuPG-bug-id: 4392 to me more consistent but is not a solution to the actual bug. Caution: The ecc.scm test now fails because two of the sample keys don't have binding signatures. Signed-off-by: Werner Koch <wk@gnupg.org>
* tests: Add sample secret key w/o binding signatures.Werner Koch2019-03-152-0/+66
| | | | | | -- GnuPG-bug-id: 4392
* gpgscm: Build well even if NDEBUG defined.NIIBE Yutaka2019-02-251-1/+3
| | | | | | | | | | | | | | | | * gpgscm/scheme.c (gc_reservation_failure): Fix adding ";". [!NDEBUG] (scheme_init_custom_alloc): Don't init seserved_lineno. -- Picked from libgpg-error commit of: 8a9397896fd202dcfb3fb46259e43bc05a0ddd2e In some build environment, NDEBUG is defined (although it's bad practice). This change supports such a situation. GnuPG-bug-id: 3959 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tests: Add "disable-scdaemon" in gpg-agent.conf.NIIBE Yutaka2019-02-215-10/+5
| | | | | | | | | | | | | | | | | * tests/openpgp/defs.scm: Add "disable-scdaemon". Remove "scdaemon-program". * tests/gpgme/gpgme-defs.scm, tests/gpgsm/gpgsm-defs.scm: Likewise. * tests/inittests, tests/pkits/inittests: Add "disable-scdaemon" -- Before this change, running "make check" accesses USB device by scdaemon on host computer. If there is any smartcard/token available, it may affect test results. Because default key choice depends on smartcard/token availability now and existing tests have nothing about testing smartcard/token, disabling scdaemon is good. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* all: fix spelling and typosDaniel Kahn Gillmor2018-10-241-5/+5
| | | | Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* gpgscm: Suppress warnings for GCC > 6.NIIBE Yutaka2018-09-061-15/+14
| | | | | | | | | | | | | | | | | * tests/gpgscm/scheme.c (CASE): Use unused attribute for GCC > 6. (FALLTHROUGH): New for fallthrough. (Eval_Cycle): Use FALLTHROUGH. Remove not-needed comment of fallthrough. -- Since GCC combines C preprocessor macro expansion, the fallthrough comment doesn't work well to suppress warnings for -Wimplicit-fallthrough, near the macro CASE. To handle this problem, we use GCC's extension of unused label and fallthrough attributes. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* gpg: Ignore the multiple message override options.Werner Koch2018-05-301-8/+4
| | | | | | | | | | | | | | | | | * g10/gpg.c (oAllowMultisigVerification) (oAllowMultipleMessages, oNoAllowMultipleMessages): Remove. (opts): Turn --allow-multisig-verification, --allow-multiple-messages and --no-allow-multiple-messages into NOPs * g10/options.h (struct opt): Remove flags.allow_multiple_messages. * g10/mainproc.c (proc_plaintext): Assume allow_multiple_messages is false. -- These options are very old compatibility hacks and should not be used anymore. We keep them as dummy options in case someone has them in the conf file. Signed-off-by: Werner Koch <wk@gnupg.org>
* gpg: Hard fail on a missing MDC even for legacy algorithms.Werner Koch2018-05-151-0/+1
| | | | | | | | * g10/mainproc.c (proc_encrypted): Require an MDC or AEAD * tests/openpgp/defs.scm (create-gpghome): Use --ignore-mdc-error to allow testing with the current files. Signed-off-by: Werner Koch <wk@gnupg.org>
* Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2018-04-107-13/+28
|\ | | | | | | | | | | | | | | | | -- Fixed conflicts: NEWS - keep master configure.ac - merge g10/card-util.c - mostly 2.2 g10/sig-check.c - 2.2
| * tests: Fix no gpg-agent upon removal of GNUPGHOME.NIIBE Yutaka2018-04-047-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/gnupg.scm (with-ephemeral-home-directory): Add teadown-fn. * tests/gpgsm/export.scm: Use -no-atexit version and stop-agent. * tests/openpgp/decrypt-session-key.scm: Likewise. * tests/openpgp/decrypt-unwrap-verify.scm: Likewise. * tests/openpgp/defs.scm (have-opt-always-trust): Likewise. (setup-environment-no-atexit): New. (start-agent): Support no use of atexit. * tests/gpgsm/gpgsm-defs.scm (setup-gpgsm-environment-no-atexit): New. * tests/migrations/common.scm (untar-armored): Follow the change of with-ephemeral-home-directory. -- When gpg-agent detects homedir removal, it will automatically exit. Then, call of 'gpgconf --kill all' will fail. So, stop-agent should be called before the removal of homedir. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* | Merge branch 'STABLE-BRANCH-2-2'Werner Koch2018-02-221-1/+1
|\|
| * tests: Fix for NetBSD with __func__.NIIBE Yutaka2018-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | * tests/asschk.c: Don't define __func__ if available. -- NetBSD 7.0 has __func__ defined. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
| * agent, tests: Support --disable-scdaemon build case.NIIBE Yutaka2017-10-262-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON. * tests/openpgp/defs.scm (create-gpghome): Likewise. * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise. -- We could modify gpg-agent to remove all support of scdaemon, with no inclusion of call-scd.c, divert-scd.c, and learncard.c, but it would not be worth to do that. GnuPG-bug-id: 3316 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
| * tests: Fix a test which specifies expiration date.NIIBE Yutaka2017-09-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/quick-key-manipulation.scm: Fix expiration time comparison. -- This is a bug fix for Amelia Earhart who is probably in UTC-12. When expiration date is specified, GnuPG interprets it as noon of the date in local time. Before this fix, the test compared the value by 2145916800 which is 2038-01-01 00:00:00 in UTC with allowance of 1 day. When the test was ran in UTC-12 timezone, it failed because of noon in the timezone is midnight of the next day in UTC. GnuPG-bug-id: 3393 Reported-by: Daniel Kahn Gillmor Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* | gpg: New maintainer option --debug-set-iobuf-size.Werner Koch2018-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | * g10/gpg.c (opts): Add new option. (opt_set_iobuf_size): New var. (set_debug): Set the option. * tests/openpgp/armor.scm: Use this option to revert the buffer size to the one which used to exhibit the tested bugs. Signed-off-by: Werner Koch <wk@gnupg.org>
* | tests: Handle the case with DISABLE_REGEX.NIIBE Yutaka2017-11-132-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/Makefile.am [DISABLE_REGEX] (EXTRA_DIST, XTESTS): Conditionalize. * tests/openpgp/all-tests.scm (all-tests): Input file is Makefile. -- The feature is only valid with !DISABLE_REGEX. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* | tests: Run the trust-pgp-4 test again.Damien Goutte-Gattat2017-11-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add trust-pgp-4.scm. (EXTRA_DIST): Remove the test file from EXTRA_DIST. -- Now that issue 2923 is fixed, the trust-pgp-4 test passes as expected and we can enable it again. That should help prevent a future regression on this issue. Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
* | tests: Minor imporvement in agent invocationWerner Koch2017-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/defs.scm (create-gpghome): Add s2k-count. -- My tests show only 2.5% improvement, but as we have that option now let's use it. real 9m12.604s user 2m20.720s sys 0m11.452s real 8m3.815s user 2m16.700s sys 0m11.544s Signed-off-by: Werner Koch <wk@gnupg.org>
* | agent, tests: Support --disable-scdaemon build case.NIIBE Yutaka2017-10-262-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON. * tests/openpgp/defs.scm (create-gpghome): Likewise. * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise. -- We could modify gpg-agent to remove all support of scdaemon, with no inclusion of call-scd.c, divert-scd.c, and learncard.c, but it would not be worth to do that. GnuPG-bug-id: 3316 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* | tests: Fix a test which specifies expiration date.NIIBE Yutaka2017-09-081-4/+4
|/ | | | | | | | | | | | | | | | | | | | | * tests/openpgp/quick-key-manipulation.scm: Fix expiration time comparison. -- This is a bug fix for Amelia Earhart who is probably in UTC-12. When expiration date is specified, GnuPG interprets it as noon of the date in local time. Before this fix, the test compared the value by 2145916800 which is 2038-01-01 00:00:00 in UTC with allowance of 1 day. When the test was ran in UTC-12 timezone, it failed because of noon in the timezone is midnight of the next day in UTC. GnuPG-bug-id: 3393 Reported-by: Daniel Kahn Gillmor Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tests: Do not run trust-pgp-4.scmWerner Koch2017-08-231-2/+5
| | | | | | | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Remove test. (EXTRA_DIST): Add test file. -- There are two problems with this test: First a syntax error in the file name so that the test was not used at all. Second the test currently returns FAIL. Fixes-commit: c23a69970ba38edae9d3b2603825d18fbb732423 Signed-off-by: Werner Koch <wk@gnupg.org>
* tests: Add tests for the PGP trust model.Damien Goutte-Gattat2017-08-2117-2/+630
| | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/trust-pgp-1.scm: New file. * tests/openpgp/trust-pgp-2.scm: New file. * tests/openpgp/trust-pgp-3.scm: New file. * tests/openpgp/trust-pgp-4.scm: New file. * tests/openpgp/trust-pgp/common.scm: New file. * tests/openpgp/trust-pgp/scenario1.asc: New file. * tests/openpgp/trust-pgp/scenario2.asc: New file. * tests/openpgp/trust-pgp/scenario3.asc: New file. * tests/openpgp/trust-pgp/scenario4.asc: New file. * tests/openpgp/trust-pgp/alice.sec.asc: New file. * tests/openpgp/trust-pgp/bobby.sec.asc: New file. * tests/openpgp/trust-pgp/carol.sec.asc: New file. * tests/openpgp/trust-pgp/david.sec.asc: New file. * tests/openpgp/trust-pgp/frank.sec.asc: New file. * tests/openpgp/trust-pgp/grace.sec.asc: New file. * tests/openpgp/trust-pgp/heidi.sec.asc: New file. * tests/openpgp/Makefile.am (XTESTS): Add new tests. (TEST_FILES): Add new files. (EXTRA_DIST): Add new common file. Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
* tests: Move some functions into a common module.Damien Goutte-Gattat2017-08-212-24/+24
| | | | | | | | | | | | | | * tests/openpgp/tofu.scm (gettrust): Moved to the common defs.scm module. (checktrust): Likewise. * tests/openpgp/defs.scm (gettrust): New function. (checktrust): Likewise. -- These functions will be re-used by the tests for the PGP trust model. Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
* gpgscm: Fix -Wimplicit-fallthrough warnings.Justus Winter2017-08-211-2/+12
| | | | | | | | * tests/gpgscm/scheme.c (CASE): Rearrange so that the case statement is at the front. (Eval_Cycle): Improve fallthrough annotations. Signed-off-by: Justus Winter <justus@g10code.com>
* tests: Improve documentation.Justus Winter2017-08-101-3/+40
| | | | | | | * tests/openpgp/README: Add quickstart instructions, how to use shell.scm, remove no longer used MKDATA. Signed-off-by: Justus Winter <justus@g10code.com>