aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gpg: New import option "import-show".Werner Koch2016-06-233-3/+28
| | | | | | | | * g10/options.h (IMPORT_SHOW): New. * g10/import.c (parse_import_options): Add "import-show". (import_one): Implement that. Signed-off-by: Werner Koch <[email protected]>
* gpg: Do not print the validity after key generation.Werner Koch2016-06-233-6/+16
| | | | | | | | | | | | | | * g10/keylist.c (struct keylist_context): Add field NO_VALIDITY. (list_keyblock_print): Take care of it. (list_keyblock_direct): Add arg NO_VALIDITY. * g10/keygen.c (do_generate_keypair): Merge keyblock and print w/o validity. -- It will always be ultimate and by not printing it we avoid a lot of garbage output due to the trustdb re-calculation. Signed-off-by: Werner Koch <[email protected]>
* common: Fix possible small memory leak in b64dec.c.Werner Koch2016-06-231-2/+3
| | | | | | * common/b64dec.c (b64dec_finish): Always release TITLE. Signed-off-by: Werner Koch <[email protected]>
* tests/openpgp: Fake the system time for the tofu test.Justus Winter2016-06-233-3/+6
| | | | | | | | | | | | | | | The keys in the tofu test are set to expire on 2016-09-17. Fake the system time for this test. This commit includes changes to the old test as well, for those who need to backport it. * tests/openpgp/gpg-agent.conf.tmpl: Drop trailing newlines. * tests/openpgp/tofu.scm: Fake system time. * tests/openpgp/tofu.test: Likewise. GnuPG-bug-id: 2393 Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Handle exceptions in the transformation monad.Justus Winter2016-06-231-13/+23
| | | | | | | | | | * tests/gpgscm/tests.scm (pipe:do): Raise errors. (tr:spawn): Catch and return errors. (tr:call-with-content): Likewise. (tr:{open,write-to,pipe-do,assert-identity,assert-weak-identity}): Adapt. Signed-off-by: Justus Winter <[email protected]>
* tests/openpgp: Improve tests.Justus Winter2016-06-232-15/+14
| | | | | | | * tests/openpgp/multisig.scm: Simplify test. * tests/openpgp/setup.scm (dearmor): Use pipe. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Add types for special objects.Justus Winter2016-06-231-6/+14
| | | | | | | | | * tests/gpgscm/scheme.c (enum scheme_types): Add types for boolean, nil, eof, and the sink object. (type_to_string): Handle new types. (scheme_init_custom_alloc): Give special objects a type. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix Scheme initialization.Justus Winter2016-06-231-0/+3
| | | | | | | | | | This potentially causes a crash if the garbage collector marks an eof object. * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize 'EOF_OBJ'. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix manual.Justus Winter2016-06-231-1/+1
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* common: Add dedicated private key functions to name-value.c.Werner Koch2016-06-234-44/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/name-value.c (struct name_value_container): Add field 'private_key_mode'. (my_error): New. Use instead of gpg_error. (nvc_new_private_key): New. (nve_release): Add arg 'private_key_mode'. (nvc_release): Call nve_release with private_key_mode flag. (nvc_delete): Ditto. (_nvc_add): Do no special case "Key:" in non-private_key_mode. (nvc_get_private_key): Return error in non-private_key_mode. (nvc_set_private_key): Ditto. (nvc_parse): Factor all code out to ... (do_nvc_parse): new. Add arg 'for_private_key'. (nvc_parse_private_key): New. * agent/findkey.c (write_extended_private_key): Replace nvc_parse by nvc_parse_private_key. (read_key_file): Ditto. * common/t-name-value.c (private_key_mode): New variable. (my_nvc_new): New. Replace all callers. (test_key_extraction): Take mode in account. (run_tests): Ditto. (run_modification_tests): Ditto. (parse): Ditto. (main): Add option --parse and rename --parse to --parse-key. -- Signed-off-by: Werner Koch <[email protected]>
* common: Rename external symbols in name-value.c.Werner Koch2016-06-234-158/+158
| | | | | | | * common/name-value.c, common/name-value.h: Rename symbol prefixes from "pkc_" to "nvc_" and from "pke_" to "nve_". Change all callers. Signed-off-by: Werner Koch <[email protected]>
* common: Rename private-keys.c to name-value.cWerner Koch2016-06-235-12/+17
| | | | | | | | | | | | | * common/private-keys.c: Rename to name-value.c. * common/private-keys.h: Rename to name-value.h. Chage all users. * common/t-private-keys.c: Rename to t-name-value.c. * common/Makefile.am: Adjust accordingly. -- The module is cool enough to be used for other purposes as well. Thus we better change the name. Signed-off-by: Werner Koch <[email protected]>
* common: Change license of b64dec.c and b64enc.c to LGPLv2.1+Werner Koch2016-06-232-28/+11
| | | | | | | | -- The code as solely been written by employees of g10 Code. Signed-off-by: Werner Koch <[email protected]>
* common: Add PGP armor decoding to b64dec.Werner Koch2016-06-231-16/+39
| | | | | | | | * common/b64dec.c (decoder_states): Add new states. (b64dec_proc): Handle PGP armored format. -- Signed-off-by: Werner Koch <[email protected]>
* tests: Add four more sample messages for the two new keys to the repo.Werner Koch2016-06-234-0/+0
| | | | | | -- These are uncompressed signed messages
* g10: Fix regression of card-edit/fetch.NIIBE Yutaka2016-06-231-17/+7
| | | | | | | | * g10/card-util.c (fetch_url): Call keyserver_fetch instead of keyserver_import_fprint. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Add a set of sample messages for the two new keys to the repo.Werner Koch2016-06-2242-0/+421
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* tests: Add two more sample keys for OpenPGP.Werner Koch2016-06-229-4/+144
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* tests/migrations: Convert to Scheme and re-enable.Justus Winter2016-06-218-138/+168
| | | | | | | | | | | | | * configure.ac: Re-enable. * tests/Makefile.am: Likewise. * tests/migrations/Makefile.am (TESTS): Use Scheme tests. * tests/migrations/common.scm: New file. * tests/migrations/extended-private-key-format.scm: Likewise. * tests/migrations/from-classic.scm: Likewise. * tests/migrations/extended-private-key-format.test: Drop file. * tests/migrations/from-classic.test: Drop file. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Add more file handling functions.Justus Winter2016-06-212-0/+44
| | | | | | | | * tests/gpgscm/ffi.c (do_glob): New function. (ffi_init): Define new function. * tests/gpgscm/tests.scm (basename-suffix): New function.x Signed-off-by: Justus Winter <[email protected]>
* tests/openpgp: Port the remaining tests to Scheme.Justus Winter2016-06-214-13/+272
| | | | | | | | | | * tests/openpgp/Makefile.am (TESTS): Add new tests. * tests/openpgp/defs.scm (gpg-with-colons): New function. (get-config): Use new function. * tests/openpgp/export.scm: New file. * tests/openpgp/tofu.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Improve test framework.Justus Winter2016-06-212-13/+19
| | | | | | | | | | | * tests/gpgscm/lib.scm (echo): Move... * tests/gpgscm/tests.scm (echo): ... here. (info, error, skip): And use echo here. (file-exists?): New function. (tr:spawn): Check that source exists and if the sink has been created. (tr:call-with-content): Hand in optional arguments. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Use native string searching functions.Justus Winter2016-06-214-43/+118
| | | | | | | | | | | | | | | | | * tests/gpgscm/ffi-private.h: Handle character arguments. * tests/gpgscm/ffi.c (do_string_index): New function. (do_string_rindex): Likewise. (do_string_contains): Likewise. (ffi_init): Define new functions. * tests/gpgscm/ffi.scm (ffi-define): New macro. * tests/gpgscm/lib.scm (string-index): Use native function, demonstrate behavior. (string-rindex): Likewise. (string-contains?): Likewise. Demonstrate behavior of various other functions. (read-all): Rework so that it can handle large files. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Improve error reporting.Justus Winter2016-06-211-2/+27
| | | | | | | * tests/gpgscm/scheme.c (type_to_string): New function. (Eval_Cycle): Include actual type in error message. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make memory allocation failures fatal.Justus Winter2016-06-211-1/+1
| | | | | | * tests/gpgscm/scheme.c (Eval_Cycle): Exit if we run out of memory. Signed-off-by: Justus Winter <[email protected]>
* sm: Do not install cacert and other root certificates.Werner Koch2016-06-211-2/+2
| | | | | | | | | | | * doc/Makefile.am (dist_pkgdata_DATA): Move qualified.txt and com-certs.pem to ... (EXTRA_DIST): here. -- With Let's Encrypt there is no more need to push CA Cert. Signed-off-by: Werner Koch <[email protected]>
* gpg: Add experimental support for an issuer fpr.Werner Koch2016-06-208-31/+100
| | | | | | | | | | | | | | | | | | | | | * common/openpgpdefs.h (SIGSUBPKT_ISSUER_FPR): New. * g10/build-packet.c (build_sig_subpkt_from_sig): Add arg PKSK and insert the issuer fpr if needed. * g10/sign.c (write_signature_packets): Pass signing key. (make_keysig_packet): Ditto. (update_keysig_packet): Ditto. * g10/parse-packet.c (dump_sig_subpkt): Print issuer fpr. (parse_one_sig_subpkt): Detect issuer fpr. (can_handle_critical): Add issuer fpr. * g10/mainproc.c (check_sig_and_print): Try to get key via fingerprint. * g10/gpgv.c (keyserver_import_fprint): New stub. * g10/test-stubs.c (keyserver_import_fprint): New stub. -- This support is enabled with the --rfc4880bis option and intended to test to recently proposed issuer fpr. Signed-off-by: Werner Koch <[email protected]>
* gpg: New option --rfc4880bis.Werner Koch2016-06-203-0/+17
| | | | | | | | | | | | | * g10/options.h (struct opt): Add field flags.rfc4880bis. * g10/gpg.c (oRFC4880bis): new. (opts): add --rfc4880bis. (main): Implement that and print a warning. -- This is option enables experimental features which may be dropped or changed with the next release. Signed-off-by: Werner Koch <[email protected]>
* scd: Reset nonnull_nad to zero for VENDOR_GEMPC.Niibe Yutaka2016-06-191-1/+1
| | | | | | | | | | | | | | * (parse_ccid_descriptor): nonnull_nad = 0 for all GEMPC device. -- We can't use the driver for 08E6:3438, while it works well under PC/SC service. I found that the library of ccid always uses the node address = ZERO for all transactions. So, we extend the same handling for not only GEMPC_CT30, but also for all its devices. Debian-bug-id: 814584 Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Make make distcheck work again.Werner Koch2016-06-174-11/+14
| | | | | | | | | | | | | | | * Makefile.am (tests): Remove test code which would led to doubling calls to for e.g. "make distclean". * tests/Makefile.am: Typo fixes. * tests/gpgscm/Makefile.am (EXTRA_DIST): Fix name of License file. Add repl.scm. (check): Replace by check-local because check is a standard automake target. * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Replace gmake0sim by automake generated macro. (EXTRA_DIST): Add defs.scm Signed-off-by: Werner Koch <[email protected]>
* gpgscm: Silence compiler warnings.Werner Koch2016-06-171-7/+12
| | | | | | | | | | | * tests/gpgscm/scheme.c (mk_integer): Rename arg NUM to N. (fill_vector): Ditto. (mark): Rename var NUM to N. (set_slot_in_env): Mark SC as unused. (is_any): Mark P as unused. -- Signed-off-by: Werner Koch <[email protected]>
* Add license notices for TinySCHEME.Werner Koch2016-06-173-2/+40
| | | | | | | | | | | | | * tests/gpgscm/COPYING: Rename to ... * tests/gpgscm/LICENSE.TinySCHEME: this. * AUTHORS: Add a note about TinySCHEME. * build-aux/speedo/w32/pkg-copyright.txt: Add TinySCHEME notice. -- I renamed the file with the license terms to avoid confusion with the standard name for the GPL. Signed-off-by: Werner Koch <[email protected]>
* build: Ignore two build image files in doc/Werner Koch2016-06-171-0/+2
| | | | | | -- Reported-by: Daniel Kahn Gillmor <[email protected]>
* tests/openpgp: Reimplement tests in Scheme.Justus Winter2016-06-1740-18/+3474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am: Build the test infrastructure on Windows. * tests/openpgp/Makefile.am (required_pgms): Add gpgscm. (TESTS_ENVIRONMENT): Make sure gpgscm and the libraries are found. (TESTS): Replace tests with the new Scheme implementations. * tests/openpgp/4gb-packet.scm: New file. * tests/openpgp/README: Likewise. * tests/openpgp/armdetach.scm: Likewise. * tests/openpgp/armdetachm.scm: Likewise. * tests/openpgp/armencrypt.scm: Likewise. * tests/openpgp/armencryptp.scm: Likewise. * tests/openpgp/armor.scm: Likewise. * tests/openpgp/armsignencrypt.scm: Likewise. * tests/openpgp/armsigs.scm: Likewise. * tests/openpgp/clearsig.scm: Likewise. * tests/openpgp/conventional-mdc.scm: Likewise. * tests/openpgp/conventional.scm: Likewise. * tests/openpgp/decrypt-dsa.scm: Likewise. * tests/openpgp/decrypt.scm: Likewise. * tests/openpgp/default-key.scm: Likewise. * tests/openpgp/defs.scm: Likewise. * tests/openpgp/detach.scm: Likewise. * tests/openpgp/detachm.scm: Likewise. * tests/openpgp/ecc.scm: Likewise. * tests/openpgp/encrypt-dsa.scm: Likewise. * tests/openpgp/encrypt.scm: Likewise. * tests/openpgp/encryptp.scm: Likewise. * tests/openpgp/finish.scm: Likewise. * tests/openpgp/genkey1024.scm: Likewise. * tests/openpgp/gpgtar.scm: Likewise. * tests/openpgp/import.scm: Likewise. * tests/openpgp/mds.scm: Likewise. * tests/openpgp/multisig.scm: Likewise. * tests/openpgp/run-tests.scm: Likewise. * tests/openpgp/seat.scm: Likewise. * tests/openpgp/setup.scm: Likewise. * tests/openpgp/signencrypt-dsa.scm: Likewise. * tests/openpgp/signencrypt.scm: Likewise. * tests/openpgp/sigs-dsa.scm: Likewise. * tests/openpgp/sigs.scm: Likewise. * tests/openpgp/use-exact-key.scm: Likewise. * tests/openpgp/verify.scm: Likewise. * tests/openpgp/version.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Add a TinySCHEME-based test driver.Justus Winter2016-06-1715-1/+2550
| | | | | | | | | | | | | | | | | | | | * configure.ac: Add new component. * tests/Makefile.am: Likewise. * tests/gpgscm/Makefile.am: New file. * tests/gpgscm/ffi-private.h: Likewise. * tests/gpgscm/ffi.c: Likewise. * tests/gpgscm/ffi.h: Likewise. * tests/gpgscm/ffi.scm: Likewise. * tests/gpgscm/lib.scm: Likewise. * tests/gpgscm/main.c: Likewise. * tests/gpgscm/private.h: Likewise. * tests/gpgscm/repl.scm: Likewise. * tests/gpgscm/scheme-config.h: Likewise. * tests/gpgscm/t-child.c: Likewise. * tests/gpgscm/t-child.scm: Likewise. * tests/gpgscm/tests.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Foreign objects support for TinySCHEME.Justus Winter2016-06-173-1/+45
| | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct cell): Add 'foreign_object'. (is_foreign_object): New prototype. (get_foreign_object_{vtable,data}): Likewise. * tests/gpgscm/scheme.c (enum scheme_types): New type. (is_foreign_object): New function. (get_foreign_object_{vtable,data}): Likewise. (mk_foreign_object): Likewise. (finalize_cell): Free foreign objects. (atom2str): Pretty-print foreign objects. (vtbl): Add new functions. * tests/gpgscm/scheme.h (struct foreign_object_vtable): New type. (mk_foreign_object): New prototype. (struct scheme_interface): Add new functions. Patch from Thomas Munro, https://sourceforge.net/p/tinyscheme/patches/13/ Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Dynamically allocate string buffer.Justus Winter2016-06-172-4/+34
| | | | | | | | | | | | | | * tests/gpgscm/scheme-config.h (strbuff{,_size}): Make buffer dynamic. * tests/gpgscm/scheme.c (expand_strbuff): New function. (putcharacter): Adapt length test. (readstrexp): Expand buffer if necessary. (scheme_init_custom_alloc): Initialize buffer. (scheme_deinit): Free buffer. Patch from Thomas Munro, https://sourceforge.net/p/tinyscheme/patches/11/ Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Make exception value available.Justus Winter2016-06-171-4/+5
| | | | | * tests/gpgscm/init.scm (throw): Hand exception value to the handler. (catch): And bind it to *error*.
* tests/gpgscm: Add package macro.Justus Winter2016-06-171-0/+5
| | | | | | * tests/gpgscm/init.scm: Add package macro from manual. Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Expose function to open streams as Scheme ports.Justus Winter2016-06-172-1/+3
| | | | | | | | * tests/gpgscm/scheme.c (vtbl): Add 'port_from_file' to the vtable. * tests/gpgscm/scheme.h (struct scheme_interface): New field 'mk_port_from_file'. Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Nicer error message.Justus Winter2016-06-171-1/+1
| | | | | | | * tests/gpgscm/scheme.c (opexe_0): Include the value that we tried to evaluate as function-like in the error message. Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Fix error hook.Justus Winter2016-06-171-1/+2
| | | | | | | * tests/gpgscm/init.scm (*error-hook*): Fix error hook so that the whole error message is displayed. Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Handle unhandled enumeration values.Justus Winter2016-06-171-0/+6
| | | | | | | * tests/gpgscm/scheme.c (opexe_{3,4}): Handle unhandled enumeration values in the opcode dispatching code. Signed-off-by: Justus Winter <[email protected]>
* tests/gpgscm: Verbatim import of latest TinySCHEME.Justus Winter2016-06-177-0/+6917
| | | | | | | | | | | | | | Revision 110 from svn://svn.code.sf.net/p/tinyscheme/code/trunk * tests/gpgscm/COPYING: New file. * tests/gpgscm/Manual.txt: Likewise. * tests/gpgscm/init.scm: Likewise. * tests/gpgscm/opdefines.h: Likewise. * tests/gpgscm/scheme-private.h: Likewise. * tests/gpgscm/scheme.c: Likewise. * tests/gpgscm/scheme.h: Likewise. Signed-off-by: Justus Winter <[email protected]>
* scd: Make option --homedir work.Werner Koch2016-06-171-0/+1
| | | | | | | | | | * scd/scdaemon.c (opts): Add --homedir. -- Without that entry the homedir setting won't work. GnuPG-bug-id: 2386 Signed-off-by: Werner Koch <[email protected]>
* doc: Add more strong hints towards --with-colons.Werner Koch2016-06-161-4/+5
| | | | --
* speedo: New target w32-release-offlineWerner Koch2016-06-161-0/+4
| | | | | | | | -- As long as a current swdb.lst is available and all directories below ~/b carry the appropriate tarballs this target can be used to build a w32-installer w/0 any network access.
* Merge branch 'master' of git+ssh://playfair.gnupg.org/git/gnupgWerner Koch2016-06-161-2/+6
|\
| * g10: Fix another race condition for trustdb access.Niibe Yutaka2016-06-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/tdbio.c (create_version_record): Call create_hashtable to always make hashtable, together with the version record. (get_trusthashrec): Remove call to create_hashtable. -- GnuPG-bug-id: 1675 Thanks to Scott Moser for a reproducible script and patience. Signed-off-by: NIIBE Yutaka <[email protected]>
* | Post release updatesWerner Koch2016-06-162-2/+6
| | | | | | | | --