aboutsummaryrefslogtreecommitdiffstats
path: root/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpgtar: Prefer --set-filename over implicit nameAndre Heinecke2017-11-151-6/+6
| | | | | | | | | | | | | * tools/gpgtar-extract.c: Prefer opt.filename over filename for the directory prefix. -- If you would extract from stdin (filename -) and use set-filename to provide a real filename the "-" would be used for the directory name. With this change an explicit filename is prefered. GnuPG-Bug-Id: T3500 Signed-off-by: Andre Heinecke <[email protected]>
* gpgconf: Ignore non-installed components with --apply-profile.Werner Koch2017-10-241-4/+13
| | | | | | | | | | | | | | * tools/gpgconf-comp.c (retrieve_options_from_program): Add arg only_installed. (gc_component_retrieve_options): Use this if we want to process all components. -- Note that this also also ignores them in --with-defaults. This is useful for systems which come without scdaemon. GnuPG-bug-id: 3313 Signed-off-by: Werner Koch <[email protected]>
* wks: Create a new user id if provider wants mailbox-only.Werner Koch2017-09-181-8/+69
| | | | | | | | * tools/gpg-wks-client.c (get_key): Add arg 'exact'. (add_user_id): New. (command_send): Create new user id. Signed-off-by: Werner Koch <[email protected]>
* wks: Send only the newest UID to the server.Werner Koch2017-09-184-22/+158
| | | | | | | | | | | | | | | | | | | * tools/wks-util.c (list_key_status_cb): Rename to key_status_cb. (wks_filter_uid): New. (wks_list_key): Allow FPR to be NULL. Return an error if no fingerprint was found. * tools/gpg-wks-server.c (process_new_key) (check_and_publish): Remove now useless extra check for FPR. * tools/gpg-wks-client.c (command_check): Ditto. (command_send): Filter out the newest uid. -- This fixes the case of having several userids with all the the same mailbox. Now we use the latest user id created. This patch is also a prerequisite to automatically create a new user id for providers with the mailbox-only policy. Signed-off-by: Werner Koch <[email protected]>
* wks: Print the UID creation time with gpg-wks-client --check.Werner Koch2017-09-183-2/+6
| | | | | | | | | * tools/gpg-wks.h (uidinfo_list_s): Add field 'created'. * tools/wks-util.c (append_to_uidinfo_list): Add arf 'created'. (wks_list_key): Pass timestamp to append_to_uidinfo_list. * tools/gpg-wks-client.c (command_check): Print UID creation time. Signed-off-by: Werner Koch <[email protected]>
* wks: Use dedicated type to convey user ids.Werner Koch2017-09-184-32/+91
| | | | | | | | | | | | | | | | | * tools/gpg-wks.h (uidinfo_list_s, uidinfo_list_t): New. * tools/wks-util.c (append_to_uidinfo_list): New. (free_uidinfo_list): New. (wks_list_key): Change arg r_mboxes to uidinfo_list_t. Use append_to_uidinfo_list. * tools/gpg-wks-server.c (sserver_ctx_s): Replace strlist_t by uidinfo_list_t. (process_new_key): Ditto. (check_and_publish): Ditto. (command_receive_cb): Replace free_strlist by free_uidinfo_list. * tools/gpg-wks-client.c (command_check): Replace strlist_t by uidinfo_list_t. Also print user id in verbose mode. Signed-off-by: Werner Koch <[email protected]>
* wks: Add hack for the broken posteo systemWerner Koch2017-09-121-2/+18
| | | | | | | * tools/gpg-wks-client.c (command_send): Additional hack for posteo. Check the protocol-version flag. Signed-off-by: Werner Koch <[email protected]>
* wks: Add new policy flag protocol-versionWerner Koch2017-09-122-2/+13
| | | | | | | * tools/gpg-wks.h (policy_flags_s): Add field protocol_version. * tools/wks-util.c (wks_parse_policy): Add new policy flag. Signed-off-by: Werner Koch <[email protected]>
* wks: Use unencrypted draft-1 mode for posteo.deWerner Koch2017-09-121-39/+81
| | | | | | | | | | | | | * tools/gpg-wks-client.c (command_send): Allow sending in draft-1 mode. -- Obviously Posteo did not implement the current draft and thus it was not possible to send a request to them. This hack uses the old method for posteo.de. Not sending it encrypted is okay here because they use authenticated sending anyway. Signed-off-by: Werner Koch <[email protected]>
* tools: New function mime_maker_add_body_data.Werner Koch2017-09-122-1/+14
| | | | | | * tools/mime-maker.c (mime_maker_add_body_data): New. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Swap "auto-key-retrieve" and "no-auto-key-retrieve".Werner Koch2017-08-231-2/+2
| | | | | | | | | | | | | | * g10/gpg.c (gpgconf_list): Announce "auto-key-retrieve". (main): Simplify setting of KEYSERVER_AUTO_KEY_RETRIEVE. * tools/gpgconf-comp.c: Make "no-auto-key-retrieve" invisible. Make "auto-key-retrieve" an expert option. -- This basically reverts 9bb13a0e819334681caca38c9074bd7bfc04e45e because --no-auto-key-retrieve is again the default. Note that we allow both options for the sake of profiles. Signed-off-by: Werner Koch <[email protected]>
* build: Change SWDB tag "gnupg21" to "gnupg22".Werner Koch2017-08-231-1/+1
| | | | | | | | | * configure.ac (GNUPG_SWDB_TAG): New ac_define. Set it to "gnupg22". * tools/gpgconf.c (query_swdb): Use it. * build-aux/speedo.mk: Change tag "gnupg21" to "gnupg22". * Makefile.am (distcheck-hook): Ditto. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Make WoT settings configurable by gpgconf.Damien Goutte-Gattat2017-08-211-0/+12
| | | | | | | | | | | | * tools/gpgconf-comp.c (gc_options_gpg): Add max-cert-depth, completes-needed, and marginals-needed options. * g10/gpg.c (gpgconf_list): Likewise. -- Some tests to come for the PGP trust model will need to manipulate these parameters. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* gpg: Add option '--disable-dirmngr'.Justus Winter2017-08-081-0/+3
| | | | | | | | | | | | | | * doc/gpg.texi: Document new option. * g10/call-dirmngr.c (create_context): Fail if option is given. * g10/gpg.c (cmd_and_opt_values): New value. (opts): New option. (gpgconf_list): Add new option. (main): Handle new option. * g10/options.h (struct opt): New field 'disable_dirmngr'. * tools/gpgconf-comp.c (gc_options_gpg): New option. GnuPG-bug-id: 3334 Signed-off-by: Justus Winter <[email protected]>
* gpg: gpgconf needs to support the now default --auto-key-retrieve.Werner Koch2017-08-051-0/+2
| | | | | | | | | | * tools/gpgconf-comp.c (gc_options_gpg): Re-add "auto-key_retrieve". -- Although this option is invisible, it might be in use by gpgconf profiles. We don't want to break them. Signed-off-by: Werner Koch <[email protected]>
* gpg: Make --no-auto-key-retrieve gpgconf-igurable.Werner Koch2017-08-041-1/+1
| | | | | | | | | * g10/gpg.c (gpgconf_list): Print no-auto-key-retrieve instead of auto-key-retrieve. * tools/gpgconf-comp.c (gc_options_gpg): Replace auto-key-retrieve by no-auto-key-retrieve and chnage level from invisible to advanced. Signed-off-by: Werner Koch <[email protected]>
* agent: Make --no-grab the default.Werner Koch2017-08-041-3/+3
| | | | | | | | | | | * agent/gpg-agent.c (oGrab): New const. (opts): New option --grab. Remove description for --no-grab. (parse_rereadable_options): Make --no-grab the default. (finalize_rereadable_options): Allow --grab to override --no-grab. (main) <gpgconflist>: Add "grab". * tools/gpgconf-comp.c (gc_options_gpg_agent): Add "grab". Signed-off-by: Werner Koch <[email protected]>
* wks: Allow gpg-wks-client --supported with just the domain nameWerner Koch2017-08-031-1/+8
| | | | | | | * tools/gpg-wks-client.c (command_supported): Hack for missing local part. Signed-off-by: Werner Koch <[email protected]>
* Simple typo fix.NIIBE Yutaka2017-08-011-1/+1
| | | | | | * tools/rfc822parse.c: Fix. Signed-off-by: NIIBE Yutaka <[email protected]>
* agent: Make --ssh-fingerprint-digest re-readable.Werner Koch2017-07-281-0/+4
| | | | | | | | | | | * agent/gpg-agent.c (main): Move oSSHFingerprintDigest to ... (parse_rereadable_options): here. (opts): Change its description. (main) <aGPGConfList>: Include this option. * tools/gpgconf-comp.c (gc_options_gpg_agent): Add option at expert level. Signed-off-by: Werner Koch <[email protected]>
* wks: Fix program names in the usage diagnostics.Werner Koch2017-07-262-4/+4
| | | | | | | * tools/gpg-wks-client.c (my_strusage): Add case 12. * tools/gpg-wks-server.c (my_strusage): Add case 12: Signed-off-by: Werner Koch <[email protected]>
* wks: Add stubs for new gpg-wks-server commands.Werner Koch2017-07-261-0/+60
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Make vars read-only explicitly.NIIBE Yutaka2017-07-191-5/+5
| | | | | | | * tools/gpgconf-comp.c (gc_backend, gc_arg_type, gc_level, gc_flag) (gc_component): Add const qualifier. Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix usage of ARGPARSE_OPTS.NIIBE Yutaka2017-07-194-4/+7
| | | | | | | | | * agent/gpg-agent.c, agent/preset-passphrase.c, dirmngr/dirmngr-client.c, dirmngr/dirmngr_ldap.c, kbx/kbxutil.c, tools/gpg-check-pattern.c, tools/gpgconf.c, tools/gpgsplit.c, tools/symcryptrun.c: Use ARGPARSE_end. Signed-off-by: NIIBE Yutaka <[email protected]>
* Change license of some files to LGPLv2.1.Werner Koch2017-06-1915-112/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * COPYING.LIB: Rename to COPYING.LGPL3. * COPYING.LGPL21: New. * COPYING.GPL2: New. * Makefile.am: Distribute them. * AUTHORS: Update license pointers. Add BSI as copyright holder. * common/compliance.c, common/compliance.h: Add BSI copyright notice. Break overlong lines. * dirmngr/loadswdb.c: Add BSI copyright notices. * dirmngr/server.c: Ditto. * tools/call-dirmngr.c: Change license to LGPLv2.1. Add BSI copyright notice. * tools/call-dirmngr.h: Ditto. * tools/gpg-wks-client.c: Ditto. * tools/gpg-wks-server.c: Ditto. * tools/gpg-wks.h: Ditto. * tools/mime-maker.c: Ditto. * tools/mime-maker.h: Ditto. * tools/mime-parser.c: Ditto. * tools/mime-parser.h: Ditto. * tools/send-mail.c: Ditto. * tools/send-mail.h: Ditto. * tools/wks-receive.c: Ditto. * tools/wks-util.c: Ditto. * tools/rfc822parse.c, tools/rfc822parse.h: Change license to LGPLv2.1. -- For better deployment it seems to be better to make the Web Key Directory code more easily available. Some code was been developed under contract of the BSI. Signed-off-by: Werner Koch <[email protected]>
* Spelling fixes in docs and comments.NIIBE Yutaka2017-04-287-7/+7
| | | | | | | | | | -- In addition, fix trailing spaces in tests/inittests. GnuPG-bug-id: 3121 Reported-by: ka7 (klemens) Signed-off-by: NIIBE Yutaka <[email protected]>
* tools: Fix condition for gpg-connect-agent.NIIBE Yutaka2017-04-121-1/+1
| | | | | | | | | | | * tools/gpg-connect-agent.c (start_agent): Add paren. -- The intention is comparing the error code depending opt.use_dirmngr. Considering C Operator Precedence, we should have paren here. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10,tools: Fix bzlib.h include order.NIIBE Yutaka2017-04-111-3/+4
| | | | | | | | | | | | * g10/compress-bz2.c: Include bzlib.h after gcrypt.h. * tools/gpgsplit.c: Likewise. -- bzlib.h may include windows.h on Windows. It is better after gcrypt.h which may include winsock2.h. Signed-off-by: NIIBE Yutaka <[email protected]>
* tools: Portability fix for gpgparsemail.NIIBE Yutaka2017-04-111-1/+2
| | | | | | | | | | | | | | * tools/rfc822parse.c (my_stpcpy): Rename from stpcpy. -- When HAVE_STPCPY is not defined (no definition in libc), still, compiler may have definition as a built-in function (for some specific case like second argument is constant). In that case, having stpcpy implementation with the same name but different signature ("static" qualifier) is not good. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgconf: Add --enable-extended-key-format for the agent.Werner Koch2017-04-031-0/+3
| | | | | | | * tools/gpgconf-conf.c: Add option. * agent/gpg-agent.c (main) <aGPGConfList>: Add option. Signed-off-by: Werner Koch <[email protected]>
* tests: Use gpgconf to stop the agent.Werner Koch2017-03-231-1/+37
| | | | | | | | | | | | | * tests/openpgp/defs.scm (stop-agent): Swap order of actions. Kill all daemons using gpgconf. * tools/gpgconf.c (main) <aRemoveSocketDir>: Try to remove known socketfails on rmdir failure. Do no fail for ENONET. -- Killing all daemons is not really required but it does not harm to be prepared for the future. Signed-off-by: Werner Koch <[email protected]>
* wks: Put stdout into binary mode for Windows at another place.Werner Koch2017-03-081-1/+5
| | | | | | * tools/wks-util.c (wks_send_mime): Set stdout to binary. Signed-off-by: Werner Koch <[email protected]>
* wks: Put stdout into binary mode for Windows.Werner Koch2017-03-081-5/+15
| | | | | | | | | | | | * tools/send-mail.c (send_mail_to_file): Call es_set_binary. -- Without that, output to stdout via --send is mangled: The "\r\n" is translated to "\r\r\n" which is bad because other software (e.g. Thunderbird) translates this again to "\n\n" and thus put all mail header liens after the first into the body. Signed-off-by: Werner Koch <[email protected]>
* tools: Removal of -Icommon.NIIBE Yutaka2017-03-071-8/+8
| | | | | | * tools/gpg-wks-server.c: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
* More change for common.NIIBE Yutaka2017-03-072-2/+2
| | | | | | * g10, scd, test, tools: Follow the change of removal of -Icommon. Signed-off-by: NIIBE Yutaka <[email protected]>
* Remove -I option to common.NIIBE Yutaka2017-03-0717-49/+49
| | | | | | | | | | | | | * dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
* tools: More portable for openpty use.NIIBE Yutaka2017-03-071-0/+12
| | | | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Add util.h libutil.h and termios.h. * tools/symcryptrun.c: Include those headers. -- This is for OpenBSD and FreeBSD. Signed-off-by: NIIBE Yutaka <[email protected]>
* wks: Set published keys world-readable.Werner Koch2017-03-061-0/+5
| | | | | | * tools/gpg-wks-server.c (check_and_publish): Set the permissions. Signed-off-by: Werner Koch <[email protected]>
* tools: Fix compile error with older gcc versions.Werner Koch2017-03-021-4/+2
| | | | | | | | | * tools/mime-parser.h: Include rfc822parse.h. (struct rfc822parse_context): Remove duplicate definition. -- GnuPG-bug-id: 2851 Signed-off-by: Werner Koch <[email protected]>
* common,tools: Always escape newlines when escaping data.Justus Winter2017-03-021-0/+7
| | | | | | | | | | * common/stringhelp.c (do_percent_escape): Always escape newlines. * tools/gpgconf-comp.c (gc_percent_escape): Likewise. -- Newlines always pose a problem for a line-based communication format. GnuPG-bug-id: 2387 Signed-off-by: Justus Winter <[email protected]>
* gpg,tools: Make auto-key-retrieve configurable via gpgconf.Justus Winter2017-02-281-0/+2
| | | | | | | | * g10/gpg.c (gpgconf_list): Add 'auto-key-retrieve'. * tools/gpgconf-comp.c (gc_options_gpg): Likewise. GnuPG-bug-id: 2381 Signed-off-by: Justus Winter <[email protected]>
* gpg,tools: Make trust-model configurable via gpgconf.Justus Winter2017-02-281-0/+4
| | | | | | | | * g10/gpg.c (gpgconf_list): Add 'trust-model'. * tools/gpgconf-comp.c (gc_options_gpg): Likewise. GnuPG-bug-id: 2381 Signed-off-by: Justus Winter <[email protected]>
* wks: Make sure that the draft 2 request is correctly detected.Werner Koch2017-02-234-35/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | * tools/gpg-wks.h (WKS_DRAFT_VERSION): New. * tools/wks-receive.c (new_part): Move test wks draft version to ... (t2body): new callback. (wks_receive): Register this callback. * tools/gpg-wks-server.c (send_confirmation_request): Emit draft version header. (send_congratulation_message): Ditto. * tools/gpg-wks-client.c (decrypt_stream_parm_s): New. (decrypt_stream_status_cb): Check DECRYTPION_KEY status. (decrypt_stream): Get infor from new callback. (process_confirmation_request): New arg 'mainfpr'. Check that it matches the decryption key. (read_confirmation_request): Check that the decryption key has been generated by us. (command_send): Use macro from draft version header. (send_confirmation_response): Emit draft version header. -- This patch also adds a check to only send a confirmation when the decryption has been done by an ultimately trusted (self-generated) key. Signed-off-by: Werner Koch <[email protected]>
* wks: New callback for the mime parser.Werner Koch2017-02-232-0/+27
| | | | | | | | | | | * tools/mime-parser.c (mime_parser_context_s): New field 't2body'. (parse_message_cb): Call that callback. (mime_parser_set_t2body): New. -- This callback allows to process header values even on the outer level. Signed-off-by: Werner Koch <[email protected]>
* Fix spelling.Daniel Kahn Gillmor2017-02-211-1/+1
| | | | | | | | | -- Clean up several other misspellings noticed while reviewing Yuri's de-duplication patch. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Clean up word replication.Yuri Chornoivan2017-02-217-11/+11
| | | | | | | | | -- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpgconf: No ENOENT warning with --change-options et al.Werner Koch2017-02-131-2/+5
| | | | | | | | | | | | | | | | * tools/gpgconf-comp.c (retrieve_options_from_program): Check ERRNO before printing a warning. -- It is common that a conf files does not exist - thus we should not print a warning. GnuPG-bug-id: 2944 BTW: The error messages in gpgconf should be reworked to match those of the other components. Signed-off-by: Werner Koch <[email protected]>
* wks: Add WKS-Phase headers to the server messages.Werner Koch2017-02-071-0/+10
| | | | | | | | * tools/gpg-wks-server.c (send_confirmation_request): Add custom header. (send_congratulation_message): Ditto. Signed-off-by: Werner Koch <[email protected]>
* tools: Use platform abstraction for I/O.Justus Winter2017-01-241-10/+10
| | | | | | | | | | | | * tools/gpg-connect-agent.c (main): Use a gpgrt_stream_t for 'script_fp'. Adapt accordingly. -- Werner asked me to make gpgconf use the platform abstractions that were introduced after gpgconf's inception. After doing that, I realized that 'read_line' is only used in two more places, one of which this patch takes care of. Signed-off-by: Justus Winter <[email protected]>
* tools: Use platform abstraction for I/O.Justus Winter2017-01-241-96/+95
| | | | | | | | | | | | | | * tools/gpgconf-comp.c (retrieve_options_from_file): Use a gpgrt_stream_t for 'list_file'. Adapt accordingly. (copy_file): Likewise for 'src' and 'dst'. (change_options_file): Likewise for 'src_file' and 'dest_file'. (change_options_program): Likewise for 'src_file' and 'dest_file'. (gc_process_gpgconf_conf): Likewise for 'config'. -- Werner asked me to make gpgconf use the platform abstractions that were introduced after gpgconf's inception. Signed-off-by: Justus Winter <[email protected]>