aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * tools: Add modules for MIME parsing and creating.Werner Koch2016-06-295-1/+1492
| | | | | | | | | | | | | | | | | | * tools/mime-maker.c: New. * tools/mime-maker.h: New. * tools/mime-parser.c: New. * tools/mime-parser.h: New. Signed-off-by: Werner Koch <[email protected]>
| * gpgscm: Fix memory leaks.Justus Winter2016-06-283-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/ffi-private.h (ffi_schemify_name): Fix prototype. (ffi_define_function_name): Free schemified name. (ffi_define_function): Likewise. (ffi_define_constant): Likewise. (ffi_define_variable_pointer): Likewise. * tests/gpgscm/ffi.c (do_wait_processes): Free arrays. (ffi_schemify_name): Fix type. * tests/gpgscm/main.c (main): Free 'sc'. Signed-off-by: Justus Winter <[email protected]>
| * gpgscm: Free file names.Justus Winter2016-06-281-0/+5
| | | | | | | | | | | | * tests/gpgscm/scheme.c (scheme_load_named_file): Free file name. Signed-off-by: Justus Winter <[email protected]>
| * gpgscm: Fix buffer overflow.Justus Winter2016-06-281-1/+2
| | | | | | | | | | | | | | * tests/gpgscm/scheme.c (store_string): Avoid writing past allocated buffer. Signed-off-by: Justus Winter <[email protected]>
| * g10: Fix memory leaks.Justus Winter2016-06-283-14/+20
| | | | | | | | | | | | | | | | * g10/keydb.c (keydb_get_keyblock): Free 'sigstatus' and 'iobuf'. * g10/t-keydb-get-keyblock.c: Fix trivial memory leaks. * g10/t-keydb.c: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * common: Fix memory leaks.Justus Winter2016-06-288-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/ccparray.c (ccparray_put): Free old array. * common/stringhelp.c (do_make_filename): Free 'home'. * common/t-convert.c: Fix trivial memory leaks. * common/t-iobuf.c: Likewise. * common/t-mbox-util.c: Likewise. * common/t-name-value.c: Likewise. * common/t-stringhelp.c: Likewise. * common/t-strlist.c: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * dirmngr: add option to retrieve extra WKS info.Werner Koch2016-06-281-8/+22
| | | | | | | | | | | | * dirmngr/server.c (cmd_wkd_get): Add option --submission-address. Signed-off-by: Werner Koch <[email protected]>
| * gpg: Add hack to --quick-gen-key to create Curve25519 keys.Werner Koch2016-06-281-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (quick_generate_keypair): Add special algo string "test-default". -- Well, this is a hack to quickly create keys with the algorithms we will eventually use as defaults. Usage: gpg -v --quick-gen-key --passphrase '' --batch USERID test-default Signed-off-by: Werner Koch <[email protected]>
| * common: New function rfctimestamp.Werner Koch2016-06-282-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/gettime.c (rfctimestamp): New. -- It is surprisingly hard to create an RFC-2822 compliant Date value. The problem is that strftime uses the current locale but the RFC requires that the English names are used. This code is pretty simply and avoid the extra problem of figuring out the correct timezone; instead UTC is used. For the planned use case this is anyway better. Signed-off-by: Werner Koch <[email protected]>
| * common: Add missing header file for clarity.Werner Koch2016-06-281-1/+1
| | | | | | | | | | | | * common/zb32.c: Include zb32.h. Signed-off-by: Werner Koch <[email protected]>
| * Add another collection of sample keysWerner Koch2016-06-283-2/+125
| | | | | | | | --
| * tools/gpgtar: Fix handling of '-'.Justus Winter2016-06-282-2/+2
| | | | | | | | | | | | | | * tools/gpgtar-extract.c (gpgtar_extract): Use stdin if file is '-'. * tools/gpgtar-list.c (gpgtar_list): Likewise. Signed-off-by: Justus Winter <[email protected]>
| * common: Close input stream.Justus Winter2016-06-281-0/+1
| | | | | | | | | | | | | | * common/exechelp-posix.c (gnupg_spawn_process): Also close the input stream in the child. Signed-off-by: Justus Winter <[email protected]>
| * common: Fix copying data from the spawned child.Justus Winter2016-06-281-10/+15
| | | | | | | | | | | | | | | | | | Fixes intermittent gpgtar failures. * common/exectool.c (copy_buffer_do_copy): Initialize 'nwritten'. (gnupg_exec_tool_stream): Loop until all data is copied. Signed-off-by: Justus Winter <[email protected]>
| * g10: Fix --list-packets.NIIBE Yutaka2016-06-284-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (main): Call set_packet_list_mode after assignment of opt.list_packets. * g10/mainproc.c (do_proc_packets): Don't stop processing with --list-packets as the comment says. * g10/options.h (list_packets): Fix the comment. * g10/parse-packet.c: Fix the condition for opt.list_packets. -- Debian-bug-id: 828109 Signed-off-by: NIIBE Yutaka <[email protected]>
| * build: Add aclocal macro from pkg-config.Werner Koch2016-06-252-1/+215
| | | | | | | | | | | | * m4/pkg.m4: New. Signed-off-by: Werner Koch <[email protected]>
| * yat2m: Silence lint warnings and fix a printf format bug.Werner Koch2016-06-251-5/+36
| | | | | | | | | | | | | | | | | | | | | | * doc/yat2m.c (ATTR_PRINTF, ATTR_NR_PRINTF, ATTR_MALLOC): New. (die, err, inf, xmalloc, xcalloc): New prototypes with attributes. (get_section_buffer): Take care of !N_SECTIONS. (proc_texi_cmd): Cast precision format arg. (proc_texi_buffer): Do not set IN_CMD when not used afterwards. -- Signed-off-by: Werner Koch <[email protected]>
| * gpg: New import option "import-export".Werner Koch2016-06-243-2/+84
| | | | | | | | | | | | | | | | | | | | | | * g10/import.c (parse_import_options): Add option "import-export". (write_keyblock_to_output): New. (import_one): Implement option. -- We are now in the import export business. Signed-off-by: Werner Koch <[email protected]>
| * 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]>