aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Let the RESTART command reset any scdaemon pin prompts.scd-pin-promptBen Kibbey2012-01-251-1/+6
| | | | | | | | | | | | | | The gpg-agent sends the RESTART command to scdaemon when the client has disconnected. This commit allows future connections to scdaemon use the default pinentry prompts. It is recommended to use the scdaemon LOCK command to prevent other scdaemon clients from altering the prompts before the current client has finished with the scdaemon pinentry since the set prompts are global to the application. * scd/command.c (cmd_restart): Free any allocated custom pinentry prompt strings to let the application use its default.
* Return successfully when the app has no SCD pin prompt callback.Ben Kibbey2012-01-251-1/+4
| | | | | * scd/app.c (app_set_pin_prompt): Create a log message when the app contains no pinentry prompt callback and return 0.
* Fix setting the wrong SCD pin prompt in the app.Ben Kibbey2012-01-241-1/+1
| | | | * scd/command.c (set_pinentry_prompt): Fix typo.
* Set both the app and default SCD pin prompt at the same time.Ben Kibbey2012-01-243-32/+30
| | | | | | | | | | | Fixes the case when scdaemon prompts for card insertion. * scd/app-openpgp.c (do_set_pin_prompt): Fix indentation. No longer unset the prompt with '-' since the OPTION command without a value does this anyway. * scd/app.c (expand_pin_prompt): Fix indentation. * scd/command.c (set_pinentry_prompt): Set both the default and application prompt when available.
* Add user defined pinentry prompts for SCD.Ben Kibbey2012-01-136-15/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds scdaemon "OPTION pin-prompt" and "OPTION pin-admin-prompt" along with special escapes to replace in the prompt string to inform the user of a signature count and admin PIN attempts remaining. It also adds another "standard" pinentry escape "|I|" to ignore the default pinentry prompt from gpg-agent and use the supplied 'info' parameter unmodified (cannot be used with other pinentry flags). * agent/divert-scd.c (getpin_cb): Add |I| pinentry flag to ignore the default prompt and use the 'info' parameter as the entire prompt. * scd/app-common.h (PIN_PROMPT_NONE, PIN_SIGN_PROMPT, PIN_ADMIN_PROMPT): New enumeration. (set_pin_prompt): New application callback to set a user-defined pinentry prompt. * scd/app-openpgp.c (verify_a_chv): Expand a user-defined pinentry prompt. (build_enter_admin_pin_prompt): Ditto. (do_change_pin): Ditto. (do_set_pin_prompt): New. * scd/app.c (expand_pin_prompt): New. (app_set_pin_prompt): Ditto. * scd/command.c (set_pinentry_prompt): New. (option_handler): Add option 'pin-prompt' and 'pin-admin-prompt'. (open_card): Set the user-defined pinentry prompts after selecting an application.
* gpg: Fix segv with RSA_S keys.Werner Koch2012-01-111-0/+8
| | | | | | | | | | | | | | | * g10/misc.c (pubkey_get_npkey, pubkey_get_nskey) (pubkey_get_nsig, pubkey_get_nenc): Map all RSA algo ids to GCRY_PK_RSA. -- The problem is that Libgcrypt has no more support for the alternate RSA ids and thus if asking for the number of parameters, they will return zero. Now, this leads to packing the key parameters into an opaque MPI but because the algorithm id is actually known to GPG, it assumes valid RSA parameters. An example key with RSA_S is 0x5434509D.
* estream: Avoid printing leading zeroes by %p on 32 bit systems.Werner Koch2012-01-111-1/+1
| | | | | * common/estream-printf.c (pr_pointer): Synchronize definition of AULONG with its use.
* Refresh sample keysDavid Shaw2012-01-111-432/+411
|
* Adapt HKP fix for fingerprint/long keyid retrievals for dirmngrDavid Shaw2012-01-101-7/+9
| | | | * dirmngr/ks-engine-hkp.c (ks_hkp_get): Use the longest valid keyid form
* gpg: Make the double space in the middle of a fingerprint optional.Werner Koch2012-01-061-7/+10
| | | | | | | This change might help to c+p a fingerprint from an HTML page without being enclosed in a "pre" tag. * common/userids.c (classify_user_id): Skip a second blank in the middle of a fingerprint.
* gpg: Allow use of a standard space separated fingerprint.Werner Koch2012-01-063-4/+48
| | | | | * common/userids.c (classify_user_id): Check for space separated GPG fingerprint.
* Merge ccid_driver_improvement branch.NIIBE Yutaka2012-01-062-30/+108
| | | | | | | | | | | * scd/apdu.c (ccid_keypad_operation): Rename from ccid_keypad_verify. (open_ccid_reader): Use ccid_keypad_operation for verify and modify. * scd/ccid-driver.c (VENDOR_VASCO, VASCO_920): New. (ccid_transceive_apdu_level): Permit sending packet where apdulen <= 289. Support receiving packets in a chain. (ccid_transceive_secure): Maximum is 15 for VASCO DIGIPASS 920. Support keypad_modify method such as CHANGE_REFERENCE_DATA: 0x24.
* Silence gcc warning.Marcus Brinkmann2012-01-031-1/+1
| | | | * sm/call-dirmngr.c (get_cached_cert): Make sure buflen is initialized.
* Revert last change, add comment about link() return values.Marcus Brinkmann2012-01-031-21/+11
| | | | | * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Do not check return value of link().
* Fix compiler warnings.Marcus Brinkmann2012-01-033-9/+24
| | | | | | | * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Check return value of link(). * g13/g13.c: Make sure err is initialized. * scd/scdaemon.c (main) [!USE_GCRY_THREAD_CBS]: Do not define ERR.
* Fix last change: Only set gcrypt thread callback for older versions.Marcus Brinkmann2012-01-032-4/+4
| | | | | * dirmngr/dirmngr.c, g13/g13.c: Rename FIX_GCRY_PTH_INIT to USE_GCRY_THREAD_CBS.
* Terminate csh commands with a semicolon also for dirmngr.Werner Koch2012-01-031-1/+1
| | | | * dirmngr/dirmngr.c (main): Terminate csh style output with a semicolon.
* Terminate csh commands with a semicolon.Werner Koch2012-01-032-3/+3
| | | | | | | Fixes bug#1386. * agent/gpg-agent.c (main): Terminate csh style output with a semicolon. * scd/scdaemon.c: Ditto.
* Only set gcrypt thread callback for older version of gcrypt.Marcus Brinkmann2012-01-024-1/+36
| | | | | | | | * agent/gpg-agent.c, dirmngr/dirmngr.c, g13/g13.c, scd/scdaemon.c (USE_GCRY_THREAD_CBS): New macro, defined if GCRY_THREAD_OPTION_VERSION is 0. (fixed_gcry_pth_init) [!USE_GCRY_THREAD_CBS]: Don't define. (main) [!USE_GCRY_THREAD_CBS]: Do not install thread callbacks.
* Use the longest key ID available when talking to a HKP server.David Shaw2011-12-281-7/+13
| | | | | | This is issue 1340. Now that PKSD is dead, and SKS supports long key IDs, this is safe to do. Patch from Daniel Kahn Gillmor <[email protected]>.
* Post-release version number updateWerner Koch2011-12-202-2/+6
|
* Release 2.1.0beta3.gnupg-2.1.0beta3Werner Koch2011-12-200-0/+0
|
* Prepare for the beta3 release.Werner Koch2011-12-204-10/+13
|
* po: Update the German translation.Werner Koch2011-12-201-11/+21
|
* Add the STEED Self-Signing Nonthority certificate.Werner Koch2011-12-205-2/+89
| | | | * doc/com-certs.pem: Install it when creating a keybox.
* faq: Add section on US export restrictions.Werner Koch2011-12-201-7/+37
|
* Require Libassuan 2.0.3Werner Koch2011-12-204-21/+1
| | | | | | | | | * configure.ac: Require Libassuan 2.0.3. * agent/call-scd.c (ASSUAN_CONVEY_COMMENTS): Remove macro replacement. * agent/command.c (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Remove dependency. (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Ditto. * scd/command.c (cmd_killscd) [ASSUAN_FORCE_CLOSE]: Ditto.
* Add error log and debug log for pcsc_keypad_verify and pcsc_keypad_modify.NIIBE Yutaka2011-12-201-4/+22
| | | | | * scd/apdu.c (pcsc_keypad_verify): Add debug log and error log. (pcsc_keypad_modify): Likewise.
* scd: Fix for card change returning GPG_ERR_CARD_RESET.Werner Koch2011-12-191-2/+1
| | | | | | | | | * scd/apdu.c (apdu_connect): Do not test for zero atrlen. -- When gpg-agent prompts for insertion of a card this error would be returned. Co-authored-by: Ben Kibbey <[email protected]>
* Don't kill pinentry by SIGKILL but let it quit by SIGINT.NIIBE Yutaka2011-12-161-2/+1
| | | | | * agent/call-pinentry.c (agent_popup_message_stop): To pinentry, send SIGINT (was: SIGKILL).
* Merge fix for issue 1331 from 1.4.David Shaw2011-12-151-3/+2
| | | | | * photoid.c (generate_photo_id): Check for the JPEG magic numbers instead of JFIF since some programs generate an EXIF header first.
* scd: Prefer application Geldkarte over DINSIG.Werner Koch2011-12-151-3/+3
| | | | | | | | | * scd/app.c (select_application): Reorder application tests. -- Although the DINSIG application is available on most German cards, it is in reality not used. Thus showing the Geldkarte application is more desirable for a good user experience.
* scd: Add option --dump-atr to command APDU.Werner Koch2011-12-154-184/+107
| | | | | | * scd/atr.c: Rewrite. * scd/Makefile.am (scdaemon_SOURCES): Add atr.c and atr.h. * scd/command.c (cmd_apdu): Add option --dump-atr.
* estream: New function es_fclose_snatch.Werner Koch2011-12-152-1/+109
| | | | | | | | | | * common/estream.c (cookie_ioctl_function_t): New type. (es_fclose_snatch): New function. (COOKIE_IOCTL_SNATCH_BUFFER): New constant. (struct estream_internal): Add field FUNC_IOCTL. (es_initialize): Clear FUNC_IOCTL. (es_func_mem_ioctl): New function. (es_fopenmem, es_fopenmem_init): Init FUNC_IOCTL.
* scd: Skip S/N reading for the "undefined" application.Werner Koch2011-12-141-45/+52
| | | | * scd/app.c (select_application): Skip serial number reading.
* scd: Add more status word values for documentation.Werner Koch2011-12-142-2/+8
|
* scd: Add the "undefined" stub application.Werner Koch2011-12-142-0/+21
| | | | | * scd/app.c (select_application): Implement the "undefined" application.
* agent: Pass comment lines from scd verbatim thru gpg-agent.Werner Koch2011-12-143-81/+121
| | | | | | * agent/call-scd.c (pass_status_thru): Pass comment lines verbatim. * tools/gpg-connect-agent.c (help_cmd_p): New. (main): Treat an "SCD HELP" the same as "HELP".
* scd: Fix resetting and closing of the reader.Werner Koch2011-12-141-24/+33
| | | | | | | | | | | | | | * scd/command.c (update_card_removed): Do no act on an invalid VRDR. (do_reset): Ignore apdu_reset error codes for no and inactive card. Close the reader before setting the slot to -1. (update_reader_status_file): Notify the application before closing the reader. -- With this change the scd now works as it did in the past. In particular there is no more endless loop trying to open the reader by the update_reader_status_file ticker function. That bug basically blocked all card operations until the scdaemon was killed.
* scd: Add debug option for reader function calls.Werner Koch2011-12-143-67/+143
| | | | | | | | * scd/scdaemon.h (DBG_READER_VALUE, DBG_READER): New. * scd/apdu.c (apdu_open_reader, apdu_close_reader) (apdu_shutdown_reader, apdu_connect, apdu_disconnect) (apdu_reset, apdu_get_atr, apdu_get_status): Add debug code. (apdu_activate): Remove this unused function.
* scd: New option --debug-assuan-log-cats.Werner Koch2011-12-134-19/+47
| | | | | | | | | | | | * scd/scdaemon.c (oDebugAssuanLogCats): New. (opts): Add option --debug-assuan-log-cats. (main): Implement option. * common/asshelp.c (set_libassuan_log_cats): New. -- The old way of setting the logging categories with an environment variable is awkward if sdaemon is spawned from a running gpg-agent.
* scd: Introduce a virtual reader table.Werner Koch2011-12-135-99/+129
| | | | | | | | | | | | | | | | | | | | | The vreader table makes the code more clear by explicitly talking about APDU slots and reader indices. It also accommodates for future extensions. * scd/scdaemon.h (server_control_s): Remove READER_SLOT. * scd/scdaemon.c (scd_init_default_ctrl): Do not init READER_SLOT. * scd/app.c (check_application_conflict): Add arg SLOT. * scd/command.c (slot_status_s): Rename to vreader_s. (server_local_s): Add field VREADER_IDX as replacement for the READER_SLOT in server_control_s. Change all users. (slot_table): Rename to vreader_table. Change all users. (vreader_slot): New. (do_reset, cmd_apdu): Map vreader to apdu slot. (get_reader_slot): Rename to get_current_reader. Return -1 on error. (open_card): Map vreader toapdu slot. Pass slot to check_application_conflict. (scd_command_handler): Init VREADER_IDX. (update_reader_status_file): Reset SLOT field on error.
* scd: Retry command SERIALNO for an inactive card.Werner Koch2011-12-121-1/+8
| | | | * scd/command.c (cmd_serialno): Retry once for an inactive card.
* Fix detection of card removal and insertion.Werner Koch2011-12-122-5/+18
| | | | | | | * scd/apdu.c (apdu_connect): Return status codes for no card available and inactive card. * scd/command.c (TEST_CARD_REMOVAL): Also test for GPG_ERR_CARD_RESET. (open_card): Map apdu_connect status to GPG_ERR_CARD_RESET.
* gitlog-to-changelog: New option --tear-off.Werner Koch2011-12-122-7/+13
| | | | | * scripts/gitlog-to-changelog: Add option --tear-off. * Makefile.am (gen-ChangeLog): Use that option.
* gpgsm: Add new validation model "steed".Werner Koch2011-12-079-29/+104
| | | | | | | | | | | | | | | | | | | | * sm/gpgsm.h (VALIDATE_FLAG_STEED): New. * sm/gpgsm.c (gpgsm_parse_validation_model): Add model "steed". * sm/server.c (option_handler): Allow validation model "steed". * sm/certlist.c (gpgsm_cert_has_well_known_private_key): New. * sm/certchain.c (do_validate_chain): Handle the well-known-private-key attribute. Support the "steed" model. (gpgsm_validate_chain): Ditto. * sm/verify.c (gpgsm_verify): Return "steed" in the trust status line. * sm/keylist.c (list_cert_colon): Print the new 'w' flag. -- This is the first part of changes to implement the STEED proposal as described at http://g10code.com/steed.html . The idea for X.509 is not to use plain self-signed certificates but certificates signed by a dummy CA (i.e. one for which the private key is known). Having a single CA as an indication for the use of STEED might help other X.509 implementations to implement STEED.
* Correct punctuation in the ChangeLog summary line.Werner Koch2011-12-071-0/+1
| | | | * Makefile.am (gen-ChangeLog): Supply --append-dot.
* Allow comments which will not show up in the ChangeLogWerner Koch2011-12-071-0/+9
| | | | | | | | | | * scripts/gitlog-to-changelog: Ignore lines after a "--" line. -- The first line with two dashes at the start of a line (optionally followed by white space) stops copying the commit log lines to the ChangeLog entry in "make dist". This is useful to allow adding comments to the log which are not useful in a ChangeLog.
* gpgsm: Allow specification of an AuthorityKeyIdentifier.Werner Koch2011-12-061-0/+56
| | | | | | | * sm/certreqgen.c (pAUTHKEYID): New. (read_parameters): Add keyword Authority-Key-Id. (proc_parameters): Check its value. (create_request): Insert an Authority-Key-Id.
* gpgsm: Allow arbitrary extensions for cert creation.Werner Koch2011-12-064-5/+187
| | | | | | | | * sm/certreqgen.c (pSUBJKEYID, pEXTENSION): New. (read_parameters): Add new keywords. (proc_parameters): Check values of new keywords. (create_request): Add SubjectKeyId and extensions. (parse_parameter_usage): Support "cert" and the encrypt alias "encr".