aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tools: Call sendmail directly from the wks tools.Werner Koch2016-07-027-17/+279
| | | | | | | | | | | | | | | | | | | | * tools/send-mail.c, tools/send-mail.h: New. * tools/wks-util.c: New. * tools/Makefile.am (gpg_wks_server_SOURCES): Add them. (gpg_wks_client_SOURCES): Ditto. * tools/gpg-wks.h (opt): Add fields use_sendmail and output. * tools/gpg-wks-client.c: Add options --send and --output. Rename command --send to --create. (command_send, send_confirmation_response): Output via wks_send_mime. * tools/gpg-wks-server.c: Add options --send and --output. (send_confirmation_request): Output via wks_send_mime. (check_and_publish): Add hack for name-value bug. -- With this code, a dedicated user on the server along with a procmail script, it was possible to run a basic test. Signed-off-by: Werner Koch <[email protected]>
* tools: Add options to gpg-wks-server.Werner Koch2016-07-022-7/+135
| | | | | | | | | | | | * tools/gpg-wks.h (opt): Add 'default_from' and 'extra_headers'. * tools/gpg-wks-server.c (oFrom, oHeader): New. (parse_arguments): Set them and check args. (get_submission_address): New. (send_confirmation_request): Set correct From address. Add extra headers. (process_new_key): Return an error code. Signed-off-by: Werner Koch <[email protected]>
* tools: Extend mime-maker.c:mime_maker_add_header.Werner Koch2016-07-021-11/+54
| | | | | | | | * tools/mime-maker.c (add_header): Check header name and allow name-value syntax. (mime_maker_add_header): Add mode for a syntax check. Signed-off-by: Werner Koch <[email protected]>
* doc: Describe filter expressions.Werner Koch2016-07-022-9/+124
| | | | | | | * doc/gpg.texi: Remove some superfluous .E. (FILTER EXPRESSIONS): New. Signed-off-by: Werner Koch <[email protected]>
* yat2m: Fix table formatting.Werner Koch2016-07-021-1/+3
| | | | | | | * doc/yat2m.c (proc_texi_cmd): Use .TQ for @itemx. Print a .P at the end of a level 0 table. Signed-off-by: Werner Koch <[email protected]>
* gpg: New option --export-filterWerner Koch2016-07-014-5/+141
| | | | | | | | | | | | | | | * g10/gpg.c (oExportFilter): New. (opts): Add --export-filter. (main): Handle option. * g10/export.c: Include recsel.h, init.h, and mbox-util.h. (export_keep_uid): New global var. (cleanup_export_globals): New. (parse_and_set_export_filter): New. (filter_getval): New. (apply_keep_uid_filter): New. (do_export_stream): Apply filter if set. Signed-off-by: Werner Koch <[email protected]>
* gpg: New option --import-filterWerner Koch2016-07-014-1/+182
| | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (oImportFilter): New. (opts): Add --import-filter. (main): Handle option. * g10/import.c: Include recsel.h, init.h, and mbox-util.h. (import_keep_uid): New global var. (cleanup_import_globals): New. (parse_and_set_import_filter): New. (filter_getval): New. (apply_keep_uid_filter): New. (import_one): Apply filter if set. -- Funny new option. It can for example be used to export a key with only one user id: gpg --no-options --import --import-options import-export \ --import-filter keep-uid='[email protected]' \ < full-key.pub > key-with-one-uid.pub More features will eventually be added. Signed-off-by: Werner Koch <[email protected]>
* gpg: Allow to cache the mbox in a user id struct.Werner Koch2016-07-012-0/+2
| | | | | | | | | | * g10/packet.h (PKT_user_id): Add field 'mbox'. * g10/free-packet.c (free_user_id): Free that. -- This will be required by the coming import filter. Signed-off-by: Werner Koch <[email protected]>
* gpg: Make sure a user ID packet has always a terminating Nul in memory.Werner Koch2016-07-012-2/+2
| | | | | | | | * g10/keygen.c (write_uid): Avoid overflow. -- Also the actual length if the user ID is given by LEN, using NAME diretcly is often more convenient.
* common: Add function to select records etc.Werner Koch2016-07-014-2/+1023
| | | | | | | * common/recsel.c, common/recsel.h: New. * common/t-recsel.c: New. Signed-off-by: Werner Koch <[email protected]>
* common: Smart up register_mem_cleanup_func.Werner Koch2016-07-011-0/+4
| | | | | | * common/init.c (register_mem_cleanup_func): Avoid double registration. Signed-off-by: Werner Koch <[email protected]>
* common: Annotate semi-static allocation.Justus Winter2016-07-011-0/+2
| | | | | | * common/argparse.c (optfile_parse): Allow string arguments to leak. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-07-011-2/+4
| | | | | | * g10/keyserver.c (parse_keyserver_uri): Free URI. Signed-off-by: Justus Winter <[email protected]>
* tools/gpgtar: Annotate semi-static allocation.Justus Winter2016-07-011-1/+6
| | | | | | | * tools/gpgtar.c (shell_parse_argv): Annotate argument vector as leaked. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-07-011-0/+1
| | | | | | | * g10/import.c (transfer_secret_keys): Release curve from the previous iteration. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix build with disabled kbnode cache.Justus Winter2016-07-011-2/+2
| | | | | | | * g10/kbnode.c (release_unused_nodes): Fix build with disabled kbnode cache. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-07-011-4/+6
| | | | | | * g10/trustdb.c (tdb_get_validity_core): Fix kbnode leak. Signed-off-by: Justus Winter <[email protected]>
* g10: Fix memory leak.Justus Winter2016-07-011-3/+3
| | | | | | * g10/keygen.c (keygen_set_std_prefs): Fix memory leak. Signed-off-by: Justus Winter <[email protected]>
* Fix trivial memory leaks in tests.Justus Winter2016-07-012-0/+3
| | | | | | | * dirmngr/t-ldap-parse-uri.c (check_ldap_escape_filter): Free result. * g10/t-stutter.c (main): Free file name. Signed-off-by: Justus Winter <[email protected]>
* tools: Fix trivial memory leak.Justus Winter2016-06-301-0/+10
| | | | | | * tools/gpg-connect-agent.c (main): Fix trivial memory leak. Signed-off-by: Justus Winter <[email protected]>
* 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]>