aboutsummaryrefslogtreecommitdiffstats
path: root/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpg,tools: Fix detecting OpenPGP card by serialno.NIIBE Yutaka2020-10-261-3/+1
| | | | | | | | | | | | | * tools/gpg-card.c (list_openpgp): Use ->apptype to determine card's APP. * g10/card-util.c (get_info_for_key_operation): Likewise. (current_card_status): Even if its SERIALNO is not like OpenPGP card, it's OpenPGP card when app says so. -- GnuPG-bug-id: 5100 Signed-off-by: NIIBE Yutaka <[email protected]>
* common: New functions gnupg_opendir et al.Werner Koch2020-10-213-18/+17
| | | | | | | | | | | * common/sysutils.h (struct gnupg_dirent_s): New. * common/sysutils.c: Include dirent.h. (struct gnupg_dir_s): New. (gnupg_opendir, gnupg_readdir, gnupg_closedir): New. Change all callers of opendir, readdir, and closedir to use these functions. -- GnuPG-bug-id: 5098
* Replace all calls to stat by gnupg_stat.Werner Koch2020-10-205-9/+9
| | | | | | | | | | | * common/sysutils.c (gnupg_stat): New. * common/sysutils.h: Include sys/stat.h. -- Yet another wrapper for Unicode support on Windows. GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <[email protected]>
* Replace most calls to open by a new wrapper.Werner Koch2020-10-201-2/+3
| | | | | | | | | | | | * common/sysutils.c (any8bitchar) [W32]: New. (gnupg_open): New. Replace most calls to open by this. * common/iobuf.c (any8bitchar) [W32]: New. (direct_open) [W32]: Use CreateFileW if needed. -- This is yet another step for full Unicode support on Windows. GnuPG-bug-id: 5098
* Replace most of the remaining stdio calls by estream calls.Werner Koch2020-10-203-34/+33
| | | | | | | | | | | | -- We need to use es_fopen on Windows to cope with non-ascii file names. This is quite a large but fortunately straightforward change. At a very few places we keep using stdio (for example due to the use of popen). GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <[email protected]>
* Replace all calls to access by gnupg_accessWerner Koch2020-10-203-13/+15
| | | | | | | | | | | | | | | | * common/sysutils.c (gnupg_access): New. Replace all calls to access by this wrapper. * common/homedir.c (w32_shgetfolderpath): Change to return UTF-8 directory name. (standard_homedir): Adjust for change. (w32_commondir, gnupg_cachedir): Ditto. -- Also use SHGetFolderPathW instead of SHGetFolderPathA on Windows. This is required to correctly handle non-ascii filenames on Windows. GnuPG-bug-id: 5098
* dirmngr: Add warning on the use of --add-servers.Werner Koch2020-10-051-1/+1
| | | | | * tools/gpgconf-comp.c (known_options_dirmngr): Degrade add-servers to expert mode.
* gpgconf: New option --show-versions.Werner Koch2020-10-022-8/+168
| | | | | | | | | | | | | | | | | | | * tools/gpgconf.c: Include exechelp.h. New option --show-versions. (get_revision_from_blurb): New. (show_version_gnupg): New. (show_version_libgcrypt): New. (show_version_gpgrt): New. (show_versions_via_dirmngr): New. (show_versions): New. * tools/gpgconf-comp.c (GPGNAME): Remove unused macro. * dirmngr/dirmngr.c (main): New internal option --gpgconf-versions. (get_revision_from_blurb): New. (gpgconf_versions): New. -- This option should be helpful to gather information for debugging. Signed-off-by: Werner Koch <[email protected]>
* keyboxd: Integrate into gpgconf.Werner Koch2020-09-243-1/+63
| | | | | | | | | | | | | | * common/asshelp.c (lock_spawning): Use a dedicated name for keyboxd. * common/homedir.c (keyboxd_socket_name): New. (gnupg_module_name): Put keyboxd into libexecdir. * tools/gpgconf-comp.c (known_options_keyboxd): New. (gc_component): Add entry for keyboxd. (keyboxd_runtime_change): New. (gc_component_launch): Support keyboxd. * tools/gpgconf.c (list_dirs): Emit new item keyboxd-socket. (main): Also remove keyboxd socket. Signed-off-by: Werner Koch <[email protected]>
* common,agent,dirmngr,g10,tools: Fix split_fields API.NIIBE Yutaka2020-09-188-15/+15
| | | | | | | | | | | | | | | | | | | | | | | * common/stringhelp.h (split_fields): Use const * for the strings in the ARRAY. (split_fields_colon): Likewise. * common/stringhelp.c (split_fields, split_fields_colon): Fix the implementation. * agent/call-scd.c, agent/command.c: Follow the change. * common/t-stringhelp.c, dirmngr/loadswdb.c: Likewise. * g10/call-agent.c, tools/card-call-scd.c: Likewise. * tools/card-yubikey.c, tools/gpg-card.c: Likewise. * tools/gpg-card.h, tools/gpg-wks-client.c: Likewise. * tools/gpgconf-comp.c, tools/gpgconf.c: Likewise. * tools/wks-util.c: Likewise. -- The strings in the ARRAY don't need to be released by caller, as those are references. It's easier to follow the code when it's explicitly const *. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg-connect-agent: Catch signals so that SIGPIPE is ignored.Werner Koch2020-09-101-0/+1
| | | | | | | | | | | | | * dirmngr/server.c (cmd_killdirmngr): Return 0. * tools/gpg-connect-agent.c (main): Catch signals. -- And we also print nicer diagnostics. The reason we need this is that for example "gpgconf --kill dirmngr" uses gpg-connect-agent to send a command to dirmngr. This may results in a SIGPIPE which in turn leads to an annoying error message from gpgconf. Signed-off-by: Werner Koch <[email protected]>
* gpg,tools: Add handling of supported algorithms by a card.NIIBE Yutaka2020-09-082-0/+27
| | | | | | | | | | | * g10/call-agent.h (struct agent_card_info_s): Add supported_keyalgo. * g10/call-agent.c (learn_status_cb): Parse KEY-ATTR-INFO. (agent_release_card_info): Release supported_keyalgo. * tools/gpg-card.h (struct card_info_s): Add supported_keyalgo. * tools/card-call-scd.c (learn_status_cb): Parse KEY-ATTR-INFO. (release_card_info): Release supported_keyalgo. Signed-off-by: NIIBE Yutaka <[email protected]>
* Use only one copy of the warn_server_mismatch function.Werner Koch2020-09-011-35/+3
| | | | | | | | | | | | | | | | | * common/asshelp.c (warn_server_version_mismatch): New. Actually a slightly modified version of warn_version_mismatch found in other modules. * common/status.c (gnupg_status_strings): New. * g10/cpr.c (write_status_strings2): New. * g10/call-agent.c (warn_version_mismatch): Use the new unified warn_server_version_mismatch function. * g10/call-dirmngr.c (warn_version_mismatch): Ditto. * g10/call-keyboxd.c (warn_version_mismatch): Ditto. * sm/call-agent.c (warn_version_mismatch): Ditto. * sm/call-dirmngr.c (warn_version_mismatch): Ditto. * tools/card-call-scd.c (warn_version_mismatch): Ditto. Signed-off-by: Werner Koch <[email protected]>
* scd: New option to APDU command to return the ATR as data.Werner Koch2020-08-272-6/+13
| | | | | | | | | | * scd/command.c (cmd_apdu): Add new option --data-atr. * tools/gpg-card.c (cmd_apdu): Use that here. Also fix the --exlen option and do not print the statusword in atr mode. * tools/card-call-scd.c (scd_apdu): Detect atr mode anddon't assume a status word. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Silence warnings from parsing the options filesWerner Koch2020-08-251-2/+3
| | | | | | | | * tools/gpgconf-comp.c (retrieve_options_from_program): Set verbose flag for the arg parser only in --verbose mode. -- Signed-off-by: Werner Koch <[email protected]>
* gpgconf,w32: New debug command --show-codepages.Werner Koch2020-08-252-12/+18
| | | | | | | | | | | | * tools/gpgconf.c (aShowCodepages): New. (opts): New command --show-codepages. (main) [W32]: Implement -- This is a Windows helper command to quickly check which code pages are currently used. Useful for debugging. Has no effect on Unix. Signed-off-by: Werner Koch <[email protected]>
* gpgtar,w32: Handle Unicode file names.Werner Koch2020-08-213-10/+62
| | | | | | | | | | | | | | | | | | | | | | * tools/gpgtar.c (oUtf8Strings): New. (opts): Add option --utf8-strings. (parse_arguments): Set option. * tools/gpgtar.h (opt): Add field utf8strings. * tools/gpgtar-create.c (name_to_utf8): New. (fillup_entry_w32): Use that. (scan_directory): Ditto. (scan_directory) [W32]: Convert file name to utf8. (gpgtar_create): Convert pattern. -- Note that this works only with file names read from a file or if the specified files on the command line are plain ascii. When recursing into a directory Unicode file names work again. This limitation is due to main(int, char**) which can't get the wchar version. We could fix that but is needs a bit more work in our init code. GnuPG-bug-id: 4083 Signed-off-by: Werner Koch <[email protected]>
* gpgtar: Add dummy option --tarWerner Koch2020-08-201-0/+6
| | | | | | | -- GnuPG-bug-id: 3772 Signed-off-by: Werner Koch <[email protected]>
* gpgtar: Make --files-from and --null work as described.Werner Koch2020-08-203-26/+68
| | | | | | | | | | | | * tools/gpgtar-create.c (gpgtar_create): Add args files_from and null_names. Improve reading from a file. * tools/gpgtar.c: Make global vars static. (main): Remove tests for --files-from and --null option combinations. Pass option variables to gpgtar_create. -- GnuPG-bug-id: 5027 Signed-off-by: Werner Koch <[email protected]>
* Add --chuid to gpg, gpg-card, and gpg-connect-agent.Werner Koch2020-08-142-1/+20
| | | | | | | | | | | | | | | | | | | * g10/gpg.c (oChUid): New. (opts): Add --chuid. (main): Implement --chuid. Delay setting of homedir until the new chuid is done. * sm/gpgsm.c (main): Delay setting of homedir until the new chuid is done. * tools/gpg-card.c (oChUid): New. (opts): Add --chuid. (changeuser): New helper var. (main): Implement --chuid. * tools/gpg-connect-agent.c (oChUid): New. (opts): Add --chuid. (main): Implement --chuid. -- Signed-off-by: Werner Koch <[email protected]>
* tools: Install gpgsplit againWerner Koch2020-08-131-2/+2
| | | | | | | | | -- We will also set the gpgsplit from 1.4 to noninstall. GnuPG-bug-id: 5023 Signed-off-by: Werner Koch <[email protected]>
* gpgconf: New option --chuid.Werner Koch2020-08-061-0/+8
| | | | | | | | * tools/gpgconf.c (oChUid, opts): New option --chuid. (main): Implement. -- Signed-off-by: Werner Koch <[email protected]>
* w32: Add link to $(NETLIB) for -lws2_32.NIIBE Yutaka2020-07-301-1/+1
| | | | | | | | | | | * dirmngr/Makefile.am (dirmngr_LDADD): Add $(NETLIBS). * sm/Makefile.am (gpgsm_LDADD): Ditto. * tools/Makefile.am (gpg_wks_client_LDADD): Ditto. -- GnuPG-bug-id: 4994 Signed-off-by: NIIBE Yutaka <[email protected]>
* Use gpgrt's new option parser for symcryptrun.NIIBE Yutaka2020-07-171-79/+63
| | | | | | * tools/symcryptrun.c: Follow API change of the new option parser. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg-card: Fix type of historyname.NIIBE Yutaka2020-07-171-1/+1
| | | | | | | | | * tools/gpg-card.c (interactive_loop): Remove const qualifier. -- Fixes-commit: d70b8769c888f42896ae3ef4972bf82e9b5a0c32 Signed-off-by: NIIBE Yutaka <[email protected]>
* Support a history file in gpg-card and gpg-connect-agent.Werner Koch2020-07-023-2/+91
| | | | | | | | | | | | | | | | | | | | | | | | * common/gpgrlhelp.c (read_write_history): New. (gnupg_rl_initialize): Register new function. * common/ttyio.c (my_rl_rw_history): New var. (tty_private_set_rl_hooks): Add arg read_write_history. (tty_read_history): New. (tty_write_history): New. * tools/gpg-card.c (HISTORYNAME): New. (oNoHistory): New enum value. (opts): New option --no-history. (cmd_history): New. (cmds): New command "history". (interactive_loop): Read and save the history. * tools/gpg-connect-agent.c (HISTORYNAME): New. (opts): New option --no-history. (main): Read and save the history. New command /history. -- Yeah, finally we have stored history; I should have added this much earlier. Signed-off-by: Werner Koch <[email protected]>
* card: Better detect removed cards. Add TCOS PIN menu.Werner Koch2020-06-303-53/+199
| | | | | | | | | | | | | | | | | | | | | | | | | * tools/card-call-scd.c (scd_change_pin): Add arg 'nullpin'. * tools/gpg-card.h (struct card_info_s): Add field 'card_removed'. * tools/gpg-card.c (fixup_scd_errors): New. (maybe_set_card_removed): New. (list_one_kinfo): Change type of first arg to get access to INFO. Set card_removed flag. (list_all_kinfo): Improve label alignment. (cmd_list): Check that the current card is still available. (cmd_passwd): Add option --nullpin and menu to chnage TCOS PINs. (dispatch_command): Handle card_removed flag. (interactive_loop): Ditto. -- Note that that I was not able to change the NullPIN of the standard PIN using a Signature V2 Brainpool test card. Changing the NullPIN of the QES PIN worked, though. I checked the commands send to scdaemon and they were correct - I used the very same command with gpg-connect-agent last week to set a Pin for a production Brainpool Signature card. Thus this might be a problem with this specific test card. Signed-off-by: Werner Koch <[email protected]>
* card: Add password change menu for NKS cards.Werner Koch2020-06-251-4/+52
| | | | | | | | | * tools/gpg-card.c (cmd_passwd): Add menu for NKS. Add option --reset. -- Note that the resetting does not yet work due to some bug in app-scd.c
* gpgconf: Fix regression in --launch and --kill from MarchWerner Koch2020-06-242-3/+7
| | | | | | | | | | | | * tools/gpgconf.h (gc_component_id_t): Align order with gc_component array. -- Fixes-commit: b4f1159a5bd7b2799d7d35e883e0632ebf3339c8 gpgconf: Rewrite the gpgconf-comp module from 2020-03-12 Signed-off-by: Werner Koch <[email protected]>
* card: Improve openpgp key writing in "writecert".Werner Koch2020-06-033-4/+114
| | | | | | | | | | * tools/card-keys.c (struct export_key_status_parm_s): New. (export_key_status_cb): New. (get_minimal_openpgp_key): New. * tools/gpg-card.c (cmd_writecert): Allow writing a keyblock directly from an existing gpg key. Signed-off-by: Werner Koch <[email protected]>
* card: Allow to store and retrieve keyblocks in OpenPGP cards.Werner Koch2020-05-281-6/+90
| | | | | | | | | | | | * tools/gpg-card.c: Include tlv.h. (cmd_writecert): Add option --openpgp. (cmd_readcert): Ditto. -- We use the CERT object for this and encapsulate the key block in a CMS object. Signed-off-by: Werner Koch <[email protected]>
* card: New command "apdu"Werner Koch2020-05-284-9/+108
| | | | | | | | | | | | | | | * tools/card-call-scd.c (scd_apdu): Add optional arg 'options'. * tools/gpg-card.c (cmd_apdu): New. (enum cmdids): Add cmdAPDU. (dispatch_command): Add command "apdu". (interactive_loop): Ditto. -- This command is hidden because it can be used to brick a card. The command is basically the same as sending "scd apdu" in gpg-connect-agent but here we do full decoding and printing in hex. Signed-off-by: Werner Koch <[email protected]>
* card: Update card info after "generate".Werner Koch2020-05-271-0/+8
| | | | | | * tools/gpg-card.c (cmd_generate): Re-read the card on success. Signed-off-by: Werner Koch <[email protected]>
* card: Add command "bye"Werner Koch2020-05-272-1/+2
| | | | | * tools/gpg-card.c: Add command "bye" as alias for "quit". * tools/gpg-connect-agent.c (main): Add "/quit" as alias for "/bye"
* card: Take care of removed and re-inserted cards.Werner Koch2020-05-272-4/+19
| | | | | | | | * tools/gpg-card.c (cmd_list): Take care of the need_sn_cmd flag. (cmd_factoryreset): Clear that flag. (dispatch_command): Set flag after a reset and after a CARD_NOT_PRESENT error. --
* card: Implement UID command and print capabilities.Werner Koch2020-05-263-6/+131
| | | | | | | | | | | * tools/card-call-scd.c (learn_status_cb): Return the full value for UIF. Add info about SM, MCL3, and PD. * tools/gpg-card.h (struct card_info_s): Add corresponding fields. * tools/gpg-card.c (list_openpgp): Print capabilities. Print the permanent flag for UIF. (cmd_uif): Implement. Signed-off-by: Werner Koch <[email protected]>
* card: Allow listing of NKS cards.Werner Koch2020-05-073-4/+42
| | | | | | | | | | | | | | * tools/card-call-scd.c (learn_status_cb): Always fill chvinfo. * tools/gpg-card.h (struct card_info_s): Increase size of chvinfo and chvmaxlen. * tools/gpg-card.c (list_nks): New. (print_a_version): Support single part version numbers. (list_card): Call list_nks. -- Note that chvmaxlen is not yet used with NKS. Signed-off-by: Werner Koch <[email protected]>
* doc: Typo fix in code comment.Werner Koch2020-04-071-1/+1
| | | | --
* tools: Use internal regexp routines.NIIBE Yutaka2020-04-061-2/+2
| | | | | | * tools/gpg-check-pattern.c: Use jimregexp.h. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg,card: Use the new MANUFACTURER attribute.Werner Koch2020-04-033-45/+22
| | | | | | | | | | | | | | | | | | | * tools/gpg-card.h (struct card_info_s): Add manufacturer fields. * tools/card-call-scd.c (release_card_info): Release them. (learn_status_cb): Parse MANUFACTURER attribute. * tools/gpg-card.c (get_manufacturer): Remove. (list_card): Use the new attribute. * g10/call-agent.h (struct agent_card_info_s): Add manufacturer fields. * g10/call-agent.c (agent_release_card_info): Release them. (learn_status_cb): Parse MANUFACTURER attribute. * g10/card-util.c (get_manufacturer): Remove. (current_card_status): Use new attribute. -- This does away with the duplicated OpenPGP vendor tables; they are now at a better place (app-openpgp.c). Signed-off-by: Werner Koch <[email protected]>
* gpg: Add regular expression support.NIIBE Yutaka2020-04-031-5/+5
| | | | | | | | | | | | | | | | | * AUTHORS, COPYING.other: Update. * Makefile.am (SUBDIRS): Add regexp sub directory. * configure.ac (DISABLE_REGEX): Remove. * g10/Makefile.am (needed_libs): Add libregexp.a. * g10/trustdb.c: Remove DISABLE_REGEX support. * regexp/LICENSE, regexp/jimregexp.c, regexp/jimregexp.h, regexp/utf8.c, regexp/utf8.h: New from Jim Tcl. * regexp/UnicodeData.txt: New from Unicode. * regexp/Makefile.am, regexp/parse-unidata.awk: New. * tests/openpgp/Makefile.am: Remove DISABLE_REGEX support. * tools/Makefile.am: Remove DISABLE_REGEX support. GnuPG-bug-id: 4843 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgconf: Take care of --homedir when reading/updating options.Werner Koch2020-03-191-7/+20
| | | | | | | | | | | | | | * tools/gpgconf-comp.c (gpg_agent_runtime_change): Remove unused var. (scdaemon_runtime_change): Ditto. (dirmngr_runtime_change): Ditto. (gc_component_check_options): Pass --homedir if needed. (retrieve_options_from_program): Take care of --homedir. -- This is related to bug 4882 but different due all the code changes. GnuPG-bug-id: 4882 Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Further simplify the gpgconf option processing.Werner Koch2020-03-141-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/gc-opt-flags.h (GC_OPT_FLAG_RUNTIME): Move to ... * tools/gpgconf-comp.c: here. (known_options_scdaemon): Remove "options". (known_options_dirmngr): Remove "options". (known_options_gpgsm): Remove "options". (known_options_gpg): Remove "options" and "keyserver". (struct gc_option_s): Rename active t gpgconf_list. (gc_component_list_options): Do not act upon active. (option_check_validity): Ditto. (is_known_option): Make it work correctly for unknown options. (retrieve_options_from_program): Use renamed flag gpgconf_list only to detect duplicated items from --gpgconf-list. Do not set runtime. Only e set the options if set by --gpgconf-list; never clear them. * agent/gpg-agent.c: Simplify the --gpgconf-list output. * dirmngr/dirmngr.c: Ditto. * g10/gpg.c: Ditto. * kbx/keyboxd.c: Ditto. * scd/scdaemon.c: Ditto. * sm/gpgsm.c: Ditto. * tests/openpgp/gpgconf.scm: Use "compliance" instead of "keyserver" for the string arg test. -- There is no need to read the list of options from the components unless they convey a default value. It is better to consult only the list we have in gpgconf-comp.c to decide on whether an option should be displayed. Right, this might mess up thing if a newer gpgconf version is used with an older component, but we already print warnings in this case and in general we do not want to support this anymore - the times of gpg 1.4. and 2.0 are long over now. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <[email protected]>
* gpg: New option --auto-key-importWerner Koch2020-03-141-1/+2
| | | | | | | | | | | | | | | | | * g10/gpg.c (opts): New options --auto-key-import, --no-auto-key-import, and --no-include-key-block. (gpgconf_list): Add them. * g10/options.h (opt): Add field flags.auto_key_import. * g10/mainproc.c (check_sig_and_print): Use flag to enable that feature. * tools/gpgconf-comp.c: Give the new options a Basic config level. -- Note that the --no variants of the options are intended for easy disabling at the command line. GnuPG-bug-id: 4856 Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Rewrite the gpgconf-comp module.Werner Koch2020-03-122-1583/+661
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/gpgconf.h (gc_component_t): Change type to ... (gc_component_id_t): this. (GC_COMPONENT_ANY): New, so that we can use that in gpgconf-comp.c directly. * tools/gpgconf-comp.c: Major rework. -- The primary reason for this rework is to support the global options. A second reason is to clean up the code and simplify it so that we do not anymore need to maintain a list of options in the components _and_ in gpgconf-comp.c. What we do now is to 1. Read the option tables directly from the components using the new generic --dump-option-table option. This includes the header (group) descriptions. 2. Read the default values from the components as before using --gpgconf-list and update gpgconf's internal tables with that info. 3. Read the options using gpgrt_argparser in the same way as we do this in the components. The changes also do away with the second level notion of backends; they were only used for dirmngr's extra dirmngr_ldapservers.conf file. We intend to remove that file and replace it with a regular option so that it will be similar on how OpenPGP keyservers are specified. The whole thing will currently be slower than before (in particular on Windows) but we can optimize that by keeping a cached version of the option tables and the default values in a per homedir cache file. There is also some work planned to remove most of the data returned by --gpgconf-list. What can also be done is to replace the internal tables, which list the gpgconf maintainable options, by a configuration file so that admins are able to maintain the list of these options. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <[email protected]>
* gpg: Re-group the options in the --help output.Werner Koch2020-03-061-1/+2
| | | | | | | | | | | * g10/gpg.c (opts): Change oLoadExtensions, oStrict, and oNoStrict to use ARGPARSE_ignore and remove the code in the option switch. -- This looks better and is also required for further simplifications of gpgconf. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Support reading global options (part 2).Werner Koch2020-03-061-115/+96
| | | | | | | | | | | | | | | | | | | * tools/gpgconf-comp.c: Remove all regular option descriptions. They are now read in from the component. Also remove a few meanwhile obsolete options. * agent/gpg-agent.c: Add option description which were only set in gpgconf-comp.c. * dirmngr/dirmngr.c: Ditto. * scd/scdaemon.c: Ditto. * sm/gpgsm.c: Ditto. * g10/gpg.c: Ditto. -- This second part removes all regular option descriptions because they can be read from the components. A few were missing in the components and thus moved to there. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Support reading global options (part 1).Werner Koch2020-03-052-103/+192
| | | | | | | | | | | | | | | | | | | | | * tools/gpgconf.c (main): Set the coinfig directories. * tools/gpgconf-comp.c (gc_backend): Change the name of the config files. (struct gc_option): Add new field 'attr'. (retrieve_options_from_program): Rewrite to use gpgrt_argparser. -- We need to do larger changes to gpgconf so that it is possible to get also global config options and their attributes. The old code worked along its own list of option and used a generic option file parser. This has no support for global config files. We now use gpgrt_argparser so that we to do exactly the same as the component does and thus delivers the actual option values as seen by the component. This is just a first step and we need to change more things. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Always use xmalloc.Werner Koch2020-03-031-30/+25
| | | | | | | | | | | | | | * tools/gpgconf-comp.c: Fix spelling of "cannot". Use log_assert instead of a plain assert. (gc_percent_escape, percent_deescape): Fail on malloc error. -- It does not make sense to use xtryalloc and failing then anyway. We also should use our wrappers and not a plain realloc. Everywhere elese we use the non-formal "can't" so it is better to do the same here. Signed-off-by: Werner Koch <[email protected]>
* card: Add yet another vendor.Werner Koch2020-03-031-0/+1
| | | | --