summaryrefslogtreecommitdiffstats
path: root/agent/call-scd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* agent: Require use of "SCD DEVINFO --watch" command with socket.NIIBE Yutaka2024-06-281-0/+3
| | | | | | | | | | * agent/call-scd.c (agent_card_devinfo): Check if client connects by a socket. -- GnuPG-bug-id: 7151 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Handle SCD DEVINFO --watch command in a special way.NIIBE Yutaka2024-06-271-0/+96
| | | | | | | | | | | | * agent/call-scd.c (devinfo_watch_thread): New. (agent_card_devinfo): New. (agent_card_scd): Call agent_card_devinfo when it's DEVINFO_WATCH_COMMAND. -- GnuPG-bug-id: 7151 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent:daemon: Add an argument to specify requiring socket connection.NIIBE Yutaka2024-06-271-1/+1
| | | | | | | | | | | | | * agent/agent.h (daemon_start): Add REQ_SOCK argument. * agent/call-daemon.c (daemon_start): Support specifying a socket connection. * agent/call-scd.c (start_scd): Connection don't care. * agent/call-tpm2d.c (start_tpm2d): Likewise. -- GnuPG-bug-id: 7151 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Silence debug output from the PIN caching.Werner Koch2024-06-061-3/+5
| | | | | * agent/call-scd.c (handle_pincache_put): Use log_debug only in cache debug mode.
* agent: Avoid double free of empty string in the PIN caching.Werner Koch2024-05-281-3/+7
| | | | | | | | | | * agent/call-scd.c (handle_pincache_get): Set PIN to NULL. Also add DBG_CACHE conditionals and don't return the pin in the debug output. -- This is part of GnuPG-bug-id: 7129 Co-authored-by: Jakub Jelen <jjelen@redhat.com>
* agent: Allow NULL for R_PADDING, when calling scd and tpm2d.NIIBE Yutaka2024-04-251-4/+6
| | | | | | | | | | | | | | | * agent/call-scd.c (padding_info_cb): Allow NULL. (agent_card_pkdecrypt): Likewise. * agent/divert-scd.c (divert_pkdecrypt): Likewise. * agent/divert-tpm2.c (divert_tpm2_pkdecrypt): Likewise. -- It's for RSA PKCD#1 encoding if the decrypt operation removes padding or not. When caller knows it's not RSA, this information is no use and it is better to allow NULL with the variable R_PADDING. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Handle USAGE information in KEYINFO.NIIBE Yutaka2022-05-261-4/+24
| | | | | | | | | | | * agent/agent.h (struct card_key_info_s): Add USAGE field. * agent/call-scd.c (card_keyinfo_cb): Parse USAGE field. Allow optional SERIALNO, IDSTR, and USAGE fields. Fix releasing on possible allocation error. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent,scd: Make sure to set CONFIDENTIAL flag in Assuan.NIIBE Yutaka2022-05-251-1/+6
| | | | | | | | | | | | | * agent/call-scd.c (inq_needpin): Call assuan_begin_confidential and assuan_end_confidential, and wipe the memory after use. * agent/command.c (cmd_preset_passphrase): Likewise. (cmd_put_secret): Likewise. * scd/command.c (pin_cb): Likewise. -- GnuPG-bug-id: 5977 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Fix calling handle_pincache_put.NIIBE Yutaka2021-05-281-1/+1
| | | | | | | | | | * agent/call-scd.c (padding_info_cb): Fix the argument. -- GnuPG-bug-id: 5436 Reported-by: Bogdan Luca Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Fix memory leaksJakub Jelen2021-05-201-14/+16
| | | | | | | | | | | | | | | | | | | | * agent/call-daemon.c (daemon_start): free wctp * agent/call-scd.c (agent_card_pksign): return error instead of noop (card_keyinfo_cb): free keyinfo. Restructure to avoid a goto backwards. * agent/protect.c (agent_get_shadow_info_type): allocate only as a last action. Catch xtrymalloc failure. (agent_is_tpm2_key): Free buf. -- Signed-off-by: Jakub Jelen <jjelen@redhat.com> Additional changes are: - Restructure to avoid a goto backwards. - Catch xtrymalloc failure. GnuPG-bug-id: 5393 Signed-off-by: Werner Koch <wk@gnupg.org>
* Fix the previous comment changes help doc string.NIIBE Yutaka2020-11-201-1/+1
| | | | | | * scd/command.c (hlp_learn): Fix the doc string. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* gpg,agent: Fix comments for KEYPAIRINFO status report.NIIBE Yutaka2020-11-201-1/+1
| | | | | | -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* scd: Extend KEYPAIRINFO with an algorithm string.Werner Koch2020-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | * scd/app-openpgp.c (send_keypair_info): Emit the algo string as part of a KEYPAIRINFO. * scd/command.c (do_readkey): Ditto. * scd/app-piv.c (do_readkey): Ditto. * scd/app-nks.c (do_learn_status_core): Ditto. (struct fid_cache_s): Add field algostr. (flush_fid_cache): Release it. (keygripstr_from_pk_file): Fill it and add it to the cache. Use a single exit label. * scd/app-help.c (app_help_get_keygrip_string_pk): Add new arg r_algostr. Change all callers. -- This is helpful so that callers do not need to parse the key for this basic information. Use "scd readkey --info-only" to return the info status line instead of the key material; using just --info returns the info in addition to the key material. Signed-off-by: Werner Koch <wk@gnupg.org>
* common,agent,dirmngr,g10,tools: Fix split_fields API.NIIBE Yutaka2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * 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 <gniibe@fsij.org>
* agent: separate out daemon handling infrastructure for reuseJames Bottomley2020-06-241-554/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/call-scd.c: Factor re-usable code out to ... * agent/call-daemon.c: new. Store infos in an array to allow for other backend daemons. * agent/Makefile.am (gpg_agent_SOURCES): Add new file. * agent/agent.h: Include assuan.h. (enum daemon_type): New. (opt): Replace scdaemon_program by daemon_program array. Replace scd_local by a array d_local. Change users accordingly. -- The model I'm using for a TPM daemon is the current scdaemon. That includes start and stop handlers plus liveness checks and an assuan socket generator. To avoid massive code duplication (and save me a lot of effort), I've elected to strip this code out of call-scd.c into a generic framework which can then be reused as is by the TPM handling daemon. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Co-authored-by: Werner Koch <wk@gnupg.org> Modified original patch for 2.2 heavily to fit the new framework used in master (gnupg 2.3) Signed-off-by: Werner Koch <wk@gnupg.org>
* agent: Allow to use SETHASH for arbitrary data.Werner Koch2020-05-181-0/+5
| | | | | | | | | | | | | | | | | | | * agent/agent.h (struct server_control_s): Add field digest.data. * agent/gpg-agent.c (agent_deinit_default_ctrl): Free that field. * agent/command.c (reset_notify): Ditto. (start_command_handler): ditto. (cmd_sethash): Add new option --inquire. * agent/call-scd.c (agent_card_pksign): For now return an error if inquire mode was used. * agent/command-ssh.c (ssh_handler_sign_request): Make sure digest.data is cleared. * agent/divert-scd.c (divert_pksign): Implement inquire mode. * agent/pksign.c (agent_pksign_do): Ditto. -- This is required to support EdDSA according to RFC8410. GnuPG-bug-id: 4888
* agent: Allow signing with card key even without a stub key.Werner Koch2020-02-131-9/+82
| | | | | | | | | | | | | | | | | | | | * agent/call-scd.c (agent_card_serialno): Allow NULL for R_SERIAL. (struct readkey_status_parm_s): New. (readkey_status_cb): New. (agent_card_readkey): Add optional arg R_KEYREF and change all callers. * agent/findkey.c (key_parms_from_sexp): Allow also a "public-key". * agent/divert-scd.c (ask_for_card): Allow for SHADOW_INFO being NULL. * agent/pksign.c (agent_pksign_do): Fallback to sign with an on-card if there is no stub key yet. Create the stub key. Also fixed a misnaming between s_pkey and s_skey. -- This change allows to create OpenPGP keys directly from a card without first making sure that a stub key exists. It is also the less surprising behaviour. Signed-off-by: Werner Koch <wk@gnupg.org>
* agent: Replace free by xfree in recently added code.Werner Koch2020-01-131-3/+3
| | | | | | * agent/call-scd.c (agent_card_free_keyinfo): Use xfree. Signed-off-by: Werner Koch <wk@gnupg.org>
* scd: Make SERIALNO --all work correctly and use it.Werner Koch2020-01-131-1/+1
| | | | | | | | | | | | | | * scd/app.c (maybe_switch_app): Factor reselect code out to ... (run_reselect): new. (app_write_learn_status): Tweak diagnostics. (app_do_with_keygrip): Run reselect if a card has more than one switchable application. * agent/call-scd.c (agent_card_serialno): Ditto. * tools/card-call-scd.c (start_agent): Use option --all with SERIALNO. (scd_serialno): Ditto. Signed-off-by: Werner Koch <wk@gnupg.org>
* agent: Extend agent_card_getattr with KEYGRIP.NIIBE Yutaka2020-01-131-2/+7
| | | | | | | | | | * agent/agent.h (struct card_key_info_s): KEYGRIP null terminated. (agent_card_getattr): Add KEYGRIP argument. * agent/call-scd.c (agent_card_getattr): Handle KEYGRIP argument. (card_keyinfo_cb): Make KEYGRIP null terminated. * agent/command.c (cmd_readkey): Follow the change. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* scd: Use a scdaemon internal key to protect the PIN cache IPC.Werner Koch2020-01-091-64/+47
| | | | | | | | | | | | | | | | | | | * agent/call-scd.c (handle_pincache_put): Do not decrypt. (handle_pincache_get): New. (inq_needpin): Call it. * scd/command.c (set_key_for_pincache): New. (pincache_put): Restructure and set key. (pincache_get): Ditto. -- This change does away with encrypting and decrypting the cached PIN in the agent. There is no need for this we can simply cache the cryptogram and let scdaemon decrypt after retrieving it from the agent. This way we do not need to share a key between gpg-agent and scdaemon and further the cached content is invalid after the scdaemon process has been replaced. Signed-off-by: Werner Koch <wk@gnupg.org>
* agent: SSH: SCD KEYINFO to list available keys.NIIBE Yutaka2020-01-091-76/+15
| | | | | | | | | | | | | | * agent/agent.h (agent_card_cardlist): Remove. (agent_card_keyinfo): Add CAP argument. * agent/call-scd.c (card_cardlist_cb): Remove. (agent_card_cardlist): Remove. (agent_card_keyinfo): Support CAP constraint. * agent/command-ssh.c (card_key_list): Remove. (ssh_handler_request_identities): Use SCD KEYINFO command. * agent/command.c (cmd_keyinfo): Follow the API change. * agent/divert-scd.c (ask_for_card): Likewise. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: First changes to support a PIN cache for scdaemon.Werner Koch2020-01-071-13/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/agent.h (CACHE_MODE_PIN): New. * agent/cache.c (housekeeping): Special handling of new new mode. (agent_flush_cache): Ditto. Add arg 'pincache_only' and change caller. (agent_put_cache): Support new mode. (agent_get_cache): Ditto. * agent/call-scd.c (wait_child_thread): Flush the entire PIN cache. (start_scd): Ditto. (agent_card_killscd): Ditto. (handle_pincache_put): New. Uses a dummy encryption key for now. (pincache_put_cb): New. (inq_needpin): Prepare for PINCACHE_GET inquiry. (learn_status_cb): Handle the PINENTRY_PUT status line. (get_serialno_cb): Ditto (agent_card_pksign): Ditto. (padding_info_cb): Ditto. (agent_card_readcert): Ditto. (agent_card_readkey): Ditto. (agent_card_writekey): Ditto. (card_getattr_cb): Ditto. (card_cardlist_cb): Ditto. (card_keyinfo_cb): Ditto. (pass_status_thru): Ditto. -- Take care: This is not finished. Signed-off-by: Werner Koch <wk@gnupg.org>
* agent: Stop scdaemon after reload when disable_scdaemon.NIIBE Yutaka2019-05-231-0/+9
| | | | | | | | | | * agent/call-scd.c (agent_card_killscd): New. * agent/gpg-agent.c (agent_sighup_action): Call agent_card_killscd. -- GnuPG-bug-id: 4326 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Support scdaemon operation using KEYGRIP.NIIBE Yutaka2019-05-151-7/+157
| | | | | | | | | | | | | | | | | | | | | * agent/agent.h (struct card_key_info_s): New. (divert_pksign, divert_pkdecrypt): New API. * agent/call-scd.c (card_keyinfo_cb): New. (agent_card_free_keyinfo, agent_card_keyinfo): New. * agent/divert-scd.c (ask_for_card): Having GRIP argument, ask scdaemon with agent_card_keyinfo. (divert_pksign, divert_pkdecrypt): Ditto. * agent/pkdecrypt.c (agent_pkdecrypt): Supply GRIP. * agent/pksign.c (agent_pksign_do): Ditto. -- We are going to relax the requirment for SERIALNO of card. It's OK, when a card doesn't have recorded SERIALNO. If a card has a key with GRIP, it can be used. GnuPG-bug-id: 2291, 4301 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Replace most assert by log_assert.Werner Koch2019-05-141-1/+0
| | | | --
* agent: Fix detection of exit of scdaemon.NIIBE Yutaka2019-03-061-62/+80
| | | | | | | | | | | | | | * agent/call-scd.c (start_scd): Acquire START_SCD_LOCK for SCD_LOCAL_LIST. Move common case code to fast path. Release START_SCD_LOCK before calling unlock_scd. When new CTX is allocated, clear INVALID flag. (agent_reset_scd): Serialize the access to SCD_LOCAL_LIST by START_SCD_LOCK. -- GnuPG-bug-id: 4377 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* scd:piv: Implement import of private keys for Yubikeys.Werner Koch2019-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/app-piv.c (concat_tlv_list): Add arg 'secure' and adjust callers. (writekey_rsa, writekey_ecc): New. (do_writekey): New. (do_writecert): Provide a better error message for an empty cert. (app_select_piv): Register do_writekey. * scd/iso7816.c (iso7816_send_apdu): New. * scd/app-common.h (APP_WRITEKEY_FLAG_FORCE): New. * agent/command.c (cmd_keytocard): Make the timestamp optional. * tools/card-call-scd.c (inq_writekey_parms): Remove. (scd_writekey): Rewrite. * tools/gpg-card.c (cmd_writekey): New. (enum cmdids): Add cmdWRITEKEY. (dispatch_command, interactive_loop): Call cmd_writekey. -- This has been tested with gpgsm and RSA keys. For ECC keys only partly tested using the sample OpenPGP nistp256 and nistp384 keys because gpgsm does not yet support ECC certificates and thus we can't write the certificates to the cert object after a writekey. Note that they nevertheless show up in "gpgcard list" because gpg-card searches for them in gpg and gpgsm. However, this does not work completely. Signed-off-by: Werner Koch <wk@gnupg.org>
* agent: Minor change to the KEYTOCARD command.Werner Koch2019-03-051-10/+13
| | | | | | | | | | * agent/command.c (cmd_keytocard): Make timestamp optional. Use modern parser function. * agent/call-scd.c (agent_card_writekey): Rename an arg and for clarity return gpg_error_t instead of int. * agent/divert-scd.c (divert_writekey): Ditto. Signed-off-by: Werner Koch <wk@gnupg.org>
* scd: Add strerror to new error message.Werner Koch2018-11-301-1/+1
| | | | | | * agent/call-scd.c (wait_child_thread): Add %s. Signed-off-by: Werner Koch <wk@gnupg.org>
* agent: Better serialization for scdaemon access.NIIBE Yutaka2018-11-271-19/+16
| | | | | | | | | | | | | * agent/call-scd.c (unlock_scd): Move lock before accessing IN_USE. (wait_child_thread): Add log_info for Windows, and fixed log_error message. -- The old code is still valid with cooperate threads, but this is better. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Have a thread to wait for the child process of scdaemon.NIIBE Yutaka2018-11-261-85/+97
| | | | | | | | * agent/call-scd.c (wait_child_thread): New. (start_scd): Create a thread for wait_child_thread. (agent_scd_check_aliveness): Remove. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Defer calling assuan_release when it's still in use.NIIBE Yutaka2018-11-261-22/+40
| | | | | | | | | | * agent/call-scd.c (struct scd_local_s): Remove LOCK, introduce IN_USE and INVALID flags. (unlock_scd): Call assuan_release when CTX is invalid. (start_scd): Set IN_USE. (agent_scd_check_aliveness): Don't call assuan_release when it's in use. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Clean up SCDaemon management.NIIBE Yutaka2018-11-261-8/+1
| | | | | | | | * agent/call-scd.c (struct scd_local_s): Remove ctrl_backlink. (start_scd): Don't assign to the field. (agent_scd_check_aliveness): Fix typo in comment. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2018-04-101-2/+2
|\ | | | | | | | | | | | | | | | | -- Fixed conflicts: NEWS - keep master configure.ac - merge g10/card-util.c - mostly 2.2 g10/sig-check.c - 2.2
| * agent,scd: Use pointer to represent HANDLE.NIIBE Yutaka2018-03-271-2/+2
| | | | | | | | | | | | | | * agent/call-scd.c [HAVE_W32_SYSTEM] (start_scd): Format with %p. * scd/command.c [HAVE_W32_SYSTEM] (option_handler): Use void *. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* | agent: Fix cancellation handling for scdaemon.NIIBE Yutaka2017-09-201-41/+0
|/ | | | | | | | | | | | | | * agent/call-scd.c (cancel_inquire): Remove. (agent_card_pksign, agent_card_pkdecrypt, agent_card_writekey) (agent_card_scd): Don't call cancel_inquire. -- Since libassuan 2.1.0, cancellation command "CAN" is handled within the library, by assuan_transact. So, cancel_inquire just caused spurious "CAN" command to scdaemon which resulted an error. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Spelling fixes in docs and comments.NIIBE Yutaka2017-04-281-2/+2
| | | | | | | | | | -- In addition, fix trailing spaces in tests/inittests. GnuPG-bug-id: 3121 Reported-by: ka7 (klemens) Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Resolve conflict of util.h.NIIBE Yutaka2017-03-071-1/+1
| | | | | | | | | | | | | | | | | * agent/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * agent/call-pinentry.c, agent/call-scd.c: Follow the change. * agent/command-ssh.c, agent/command.c, agent/cvt-openpgp.c: Ditto. * agent/divert-scd.c, agent/findkey.c, agent/genkey.c: Ditto. * agent/gpg-agent.c, agent/pksign.c, agent/preset-passphrase.c: Ditto. * agent/protect-tool.c, agent/protect.c, agent/trustlist.c: Ditto. * agent/w32main.c: Ditto. -- For openpty function, we need to include util.h on some OS. We also have util.h in common/, so this change is needed. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Prepare to pass an additional parameter to the getpin callback.Werner Koch2017-02-221-31/+56
| | | | | | | | | | | | | | | | | | | | | | | | | * agent/call-scd.c (writekey_parm_s, inq_needpin_s): Merge into ... (inq_needpin_parm_s): new struct. Add new field 'getpin_cb_desc'. Change users to set all fields. (inq_needpin): Pass GETPIN_CB_DESC to the GETPIN_CB. (agent_card_pksign): Add arg 'desc_text' and change arg 'getpin_cb' to take an additional arg 'desc_text'. (agent_card_pkdecrypt): Ditto. (agent_card_writekey): Change arg 'getpin_cb' to take an additional arg 'desc_text'. (agent_card_scd): Ditto. * agent/divert-scd.c (getpin_cb): Add new arg 'desc_text'. (divert_pksign): Add new arg 'desc_text' and pass is to agent_card_pksign. (divert_pkdecrypt): Add new arg 'desc_text' and pass is to agent_card_pkdecrypt. * agent/pkdecrypt.c (agent_pkdecrypt): Pass DESC_TEXT to divert_pkdecrypt. * agent/pksign.c (agent_pksign_do): Pass DESC_TEXT to divert_pksign. -- Signed-off-by: Werner Koch <wk@gnupg.org>
* Fix spelling.Daniel Kahn Gillmor2017-02-211-3/+3
| | | | | | | | | -- Clean up several other misspellings noticed while reviewing Yuri's de-duplication patch. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* Clean up word replication.Yuri Chornoivan2017-02-211-1/+1
| | | | | | | | | -- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* agent: Send back all public keys for available cards.NIIBE Yutaka2017-02-171-0/+66
| | | | | | | | | * agent/call-scd.c (card_cardlist_cb, agent_card_cardlist): New. * agent/command-ssh.c (card_key_list): New. (ssh_handler_request_identities): Call card_key_list and loop for the list to send public keys for all available cards. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: Ask specific SERIALNO for pksign/pkdecrypt.NIIBE Yutaka2017-01-161-2/+8
| | | | | | | | | * agent/call-scd.c (agent_card_serialno): Add DEMAND argument. * agent/command-ssh.c (card_key_available): Follow the change. * agent/learncard.c (agent_handle_learn): Likewise. * agent/divert-scd.c (ask_for_card): Use DEMAND argument. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* Fix use cases of snprintf.NIIBE Yutaka2016-10-211-8/+4
| | | | | | | | | | | * agent/call-pinentry.c, agent/call-scd.c, agent/command.c, build-aux/speedo/w32/g4wihelp.c, common/get-passphrase.c, dirmngr/dirmngr.c, g10/call-agent.c, g10/cpr.c, g10/keygen.c, g10/openfile.c, g10/passphrase.c, scd/app-openpgp.c, scd/scdaemon.c, sm/call-agent.c, sm/call-dirmngr.c, sm/certreqgen.c: Fix assuming C99. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* agent: invoke scdaemon with --homedir.NIIBE Yutaka2016-09-021-2/+19
| | | | | | | | | * agent/call-scd.c (start_scd): Supply --homedir option when it's not default homedir. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* common: New put_membuf_cb to replace static membuf_data_cb.Werner Koch2016-01-081-17/+5
| | | | | | | | | | | | * common/membuf.c (put_membuf_cb): New. * agent/call-scd.c (membuf_data_cb): Remove. Change callers to use put_membuf_cb. * common/get-passphrase.c (membuf_data_cb): Ditto. * g10/call-agent.c (membuf_data_cb): Ditto. * sm/call-agent.c (membuf_data_cb): Ditto. -- Signed-off-by: Werner Koch <wk@gnupg.org>
* Fix typos found using codespell.Justus Winter2015-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/cache.c: Fix typos. * agent/call-pinentry.c: Likewise. * agent/call-scd.c: Likewise. * agent/command-ssh.c: Likewise. * agent/command.c: Likewise. * agent/divert-scd.c: Likewise. * agent/findkey.c: Likewise. * agent/gpg-agent.c: Likewise. * agent/w32main.c: Likewise. * common/argparse.c: Likewise. * common/audit.c: Likewise. * common/audit.h: Likewise. * common/convert.c: Likewise. * common/dotlock.c: Likewise. * common/exechelp-posix.c: Likewise. * common/exechelp-w32.c: Likewise. * common/exechelp-w32ce.c: Likewise. * common/exechelp.h: Likewise. * common/helpfile.c: Likewise. * common/i18n.h: Likewise. * common/iobuf.c: Likewise. * common/iobuf.h: Likewise. * common/localename.c: Likewise. * common/logging.c: Likewise. * common/openpgp-oid.c: Likewise. * common/session-env.c: Likewise. * common/sexputil.c: Likewise. * common/sysutils.c: Likewise. * common/t-sexputil.c: Likewise. * common/ttyio.c: Likewise. * common/util.h: Likewise. * dirmngr/cdblib.c: Likewise. * dirmngr/certcache.c: Likewise. * dirmngr/crlcache.c: Likewise. * dirmngr/dirmngr-client.c: Likewise. * dirmngr/dirmngr.c: Likewise. * dirmngr/dirmngr_ldap.c: Likewise. * dirmngr/dns-stuff.c: Likewise. * dirmngr/http.c: Likewise. * dirmngr/ks-engine-hkp.c: Likewise. * dirmngr/ks-engine-ldap.c: Likewise. * dirmngr/ldap-wrapper.c: Likewise. * dirmngr/ldap.c: Likewise. * dirmngr/misc.c: Likewise. * dirmngr/ocsp.c: Likewise. * dirmngr/validate.c: Likewise. * g10/encrypt.c: Likewise. * g10/getkey.c: Likewise. * g10/gpg.c: Likewise. * g10/gpgv.c: Likewise. * g10/import.c: Likewise. * g10/keydb.c: Likewise. * g10/keydb.h: Likewise. * g10/keygen.c: Likewise. * g10/keyid.c: Likewise. * g10/keylist.c: Likewise. * g10/keyring.c: Likewise. * g10/mainproc.c: Likewise. * g10/misc.c: Likewise. * g10/options.h: Likewise. * g10/packet.h: Likewise. * g10/parse-packet.c: Likewise. * g10/pkclist.c: Likewise. * g10/pkglue.c: Likewise. * g10/plaintext.c: Likewise. * g10/server.c: Likewise. * g10/sig-check.c: Likewise. * g10/sqlite.c: Likewise. * g10/tdbio.c: Likewise. * g10/test-stubs.c: Likewise. * g10/tofu.c: Likewise. * g10/trust.c: Likewise. * g10/trustdb.c: Likewise. * g13/create.c: Likewise. * g13/mountinfo.c: Likewise. * kbx/keybox-blob.c: Likewise. * kbx/keybox-file.c: Likewise. * kbx/keybox-init.c: Likewise. * kbx/keybox-search-desc.h: Likewise. * kbx/keybox-search.c: Likewise. * kbx/keybox-update.c: Likewise. * scd/apdu.c: Likewise. * scd/app-openpgp.c: Likewise. * scd/app-p15.c: Likewise. * scd/app.c: Likewise. * scd/ccid-driver.c: Likewise. * scd/command.c: Likewise. * scd/iso7816.c: Likewise. * sm/base64.c: Likewise. * sm/call-agent.c: Likewise. * sm/call-dirmngr.c: Likewise. * sm/certchain.c: Likewise. * sm/gpgsm.c: Likewise. * sm/import.c: Likewise. * sm/keydb.c: Likewise. * sm/minip12.c: Likewise. * sm/qualified.c: Likewise. * sm/server.c: Likewise. * tools/gpg-check-pattern.c: Likewise. * tools/gpgconf-comp.c: Likewise. * tools/gpgkey2ssh.c: Likewise. * tools/gpgparsemail.c: Likewise. * tools/gpgtar.c: Likewise. * tools/rfc822parse.c: Likewise. * tools/symcryptrun.c: Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* scd: Use Assuan macro instead of a number constant.Werner Koch2015-10-021-3/+4
| | | | --