aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* g10: Fix memory leak.Justus Winter2016-06-301-0/+9
| | | | | | * g10/export.c (do_export_stream): Free secret parameters. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-06-301-0/+1
| | | | | | * g10/keygen.c (read_parameter_file): Free 'line'. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-06-301-0/+1
| | | | | | * g10/sign.c (mk_notation_policy_etc): Free 'mbox'. Signed-off-by: Justus Winter <[email protected]>
* common: Fix memory leak.Justus Winter2016-06-301-0/+1
| | | | | | * g10/textfilter.c (copy_clearsig_text): Free buffer. Signed-off-by: Justus Winter <[email protected]>
* common: Fix memory leak.Justus Winter2016-06-301-3/+2
| | | | | | | * common/iobuf.c (iobuf_set_partial_body_length_mode): Only create context if necessary. Signed-off-by: Justus Winter <[email protected]>
* common: Fix memory leak.Justus Winter2016-06-301-1/+5
| | | | | | * common/simple-pwquery.c (agent_open): Free socket path. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix keybox-related memory leaks.Justus Winter2016-06-302-7/+25
| | | | | | | | | | | | | * g10/keydb.c (keydb_release): Clear keyblock cache. (keydb_get_keyblock): Revert previous change. * kbx/keybox-blob.c (create_blob_finish): Free previous buffer, free fixups after applying them. (_keybox_release_blob): Free buffer. Currently, the buffer has been extracted before the keybox is released, but this is the right thing to do here. Fixes-commit: c57501cc Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-06-301-0/+4
| | | | | | * g10/compress.c (release_context): Free buffers. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-06-301-0/+1
| | | | | | * g10/sign.c (write_plaintext_packet): Free packet. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-06-301-2/+0
| | | | | | | * g10/mainproc.c (release_list): Do not exit early if list is NULL, there are other resources that must be released. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix reallocating string ports.Justus Winter2016-06-301-1/+2
| | | | | | | * tests/gpgscm/scheme.c (realloc_port_string): Use memcpy because Scheme strings may contain 0s. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Free memory backing string ports.Justus Winter2016-06-301-0/+2
| | | | | | | * tests/gpgscm/scheme.c (finalize_cell): Free memory backing string ports. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Use the allocator from libgcrypt.Justus Winter2016-06-301-1/+2
| | | | | | * tests/gpgscm/main.c (main): Use the allocator from libgcrypt. Signed-off-by: Justus Winter <[email protected]>
* w32: Fix build.Justus Winter2016-06-301-1/+1
| | | | | | | | * g10/keyedit.c (keyedit_quick_revuid): Fix call to 'check_trustdb_stale'. Fixes-commit: 55d112ee Signed-off-by: Justus Winter <[email protected]>
* g10: Implement gpg --quick-revuidDaniel Kahn Gillmor2016-06-306-65/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/revoke.c (get_default_uid_revocation_reason): New. * g10/keyedit.c (menu_revuid): Break out creation of uid revocation into new function core_revuid. * g10/keyedit.c (keyedit_quick_revuid): New. Selects key and uid, invokes core_revuid. * g10/gpg.c (main): Handle --quick-revuid argument. * doc/gpg.texi: Document --quick-revuid. -- This functionality is a counterpart to --quick-adduid, and will be useful for projects that depend programmatically on gpg to revoke user IDs (one such example is "monkeysphere-host revoke-servicename"). Signed-off-by: Daniel Kahn Gillmor <[email protected]> - Minor re-indentation work. - Changed a "0 == memcmp" to "!memcmp" - Removed tests/openpgp/quick-key-manipulation.test from the Makefile. This test needs to be converted to gpgscm. - Removed example from whats-new-in-2.1.txt because that is generated. Signed-off-by: Werner Koch <[email protected]>
* tools: Add gpg-wks-client and gpg-wks-server.Werner Koch2016-06-298-1/+2413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add option --enable-wks-tools * tools/gpg-wks-client.c: New. * tools/gpg-wks-server.c: New. * tools/gpg-wks.h: new. * tools/wks-receive.c: New. * tools/call-dirmngr.c, tools/call-dirmngr.h: New. -- Note that this is just a starting point and not a finished implementation. Here is how to test the system using [email protected] as example. Prepare: mkdir /var/lib/gnupg/wks chmod o-rwx /var/lib/gnupg/wks mkdir /var/lib/gnupg/wks/test.gnupg.org Run the protocol: ./gpg-wks-client -v --send FPR USERID >x ./gpg-wks-server -v --receive <x >y ./gpg-wks-client --receive <y >z ./gpg-wks-server -v --receive <z You should also setup a cron job to rsync /var/lib/gnupg/wks/test.gnupg.org/hu/* to the webserver. Signed-off-by: Werner Koch <[email protected]>
* build: Improve GNUPG_BUILD_PROGRAM macro.Werner Koch2016-06-291-4/+6
| | | | | | * acinclude.m4 (GNUPG_BUILD_PROGRAM): Allow for dash in options. Signed-off-by: Werner Koch <[email protected]>
* 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