aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Remove some unused variables.Werner Koch2013-02-223-15/+11
| | | | | | | | | | | | | | * tools/gpgconf-comp.c (gc_process_gpgconf_conf): Remove unused used_components. * agent/command-ssh.c (ssh_signature_encoder_ecdsa): Mark unused arg. * g13/g13.c (main): Comment variable of yet unimplemented options.
| * gpg: Fix a memory leak in batch key generationWerner Koch2013-02-222-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (append_to_parameter): New. (proc_parameter_file): Use new func to extend the parameter list. * g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of gcry_kdf_derive failed. * g10/keygen.c (proc_parameter_file): Print a diagnostic if passphrase_to_dek failed. -- Due to an improper way of using the linked list head, all memory for items allocated in proc_parameter_file was never released. If batched key generation with a passphrase and more than ~200 keys was used this exhausted the secure memory.
| * gpg: Handle the agent's NEW_PASSPHRASE inquiry.Werner Koch2013-02-221-2/+3
| | | | | | | | * g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.
| * common: Add func has_leading_keyword.Werner Koch2013-02-222-0/+25
| | | | | | | | * common/stringhelp.c (has_leading_keyword): New.
| * Remove build hacks for FreeBSD.Werner Koch2013-02-221-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and LDFLAGS. -- Back in ~2000 we introduced a quick hack to make building of Libgcrypt on FreeBSD easier by always adding -I/usr/local/include and -L/usr/local/lib . It turned out that this is a bad idea if one wants to build with library version which is not installed in /usr/local. The hack made was eventually (in 2003) copied from Libgcrypt to GnuPG-2.
| * agent: fix two bugs.NIIBE Yutaka2013-02-222-1/+2
| | | | | | | | | | | | | | | | * agent/command.c (cmd_keytocard): Decrement KEYDATALEN. * agent/findkey.c (agent_public_key_from_file): Increment for ELEMS. -- For ECDSA and ECDH, there are 6 elements.
| * gpg: fix keytocard and support ECC card for key attribute.NIIBE Yutaka2013-02-222-4/+10
| | | | | | | | | | | | * g10/call-agent.c (agent_keytocard): Supply PARM arg. * g10/card-util.c (card_status): Support ECC. (card_store_subkey): Don't assume RSA.
| * Update .gitignore for non-VPATH builds.Werner Koch2013-02-121-9/+19
| | | | | | | | --
* | Add code to allow for late memory cleanup.Werner Koch2013-03-203-18/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/init.c (mem_cleanup_item_t): New. (run_mem_cleanup): New. (_init_common_subsystems): Add an atexit for it. (register_mem_cleanup_func): New. * g10/kbnode.c (cleanup_registered): New. (release_unused_nodes): New. (alloc_node): Call register_mem_cleanup_func. -- It is often time consuming to figure out whether still allocated memory at process termination is fine (e.g. a cache) or a problem. To help for that register_mem_cleanup_func may now be used to cleanup such memory. The run time of the program will be longer; if that turns out to be a problem we can change the code to only run in debugging mode.
* | kbx: Remove unused macro.Werner Koch2013-03-201-6/+0
| | | | | | | | * kbx/keybox.h (KEYBOX_WITH_OPENPGP): Remove unused macro.
* | po: Autoupdates for de and fr. Update gitignore.Werner Koch2013-03-203-92/+158
| | | | | | | | --
* | gpg: Fix a memory leak in batch key generationWerner Koch2013-02-212-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (append_to_parameter): New. (proc_parameter_file): Use new func to extend the parameter list. * g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of gcry_kdf_derive failed. * g10/keygen.c (proc_parameter_file): Print a diagnostic if passphrase_to_dek failed. -- Due to an improper way of using the linked list head, all memory for items allocated in proc_parameter_file was never released. If batched key generation with a passphrase and more than ~200 keys was used this exhausted the secure memory.
* | gpg: Handle the agent's NEW_PASSPHRASE inquiry.Werner Koch2013-02-211-2/+3
| | | | | | | | * g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.
* | common: Add func has_leading_keyword.Werner Koch2013-02-212-0/+25
| | | | | | | | * common/stringhelp.c (has_leading_keyword): New.
* | Remove build hacks for FreeBSD.Werner Koch2013-02-201-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and LDFLAGS. -- Back in ~2000 we introduced a quick hack to make building of Libgcrypt on FreeBSD easier by always adding -I/usr/local/include and -L/usr/local/lib . It turned out that this is a bad idea if one wants to build with library version which is not installed in /usr/local. The hack made was eventually (in 2003) copied from Libgcrypt to GnuPG-2.
* | Update .gitignore for non-VPATH builds.Werner Koch2013-02-121-9/+19
| | | | | | | | --
* | Merge branch 'master' into key-storage-workWerner Koch2013-02-1243-5016/+6184
|\|
| * gpg: Implement card_store_subkey again.NIIBE Yutaka2013-02-123-147/+123
| | | | | | | | | | | | | | | | * g10/call-agent.h (agent_keytocard): New. * g10/call-agent.c (agent_keytocard): New. * g10/card-util.c (replace_existing_key_p): Returns 1 when replace. (card_generate_subkey): Check return value of replace_existing_key_p. (card_store_subkey): Implement again using agent_keytocard.
| * agent: Add KEYTOCARD command.NIIBE Yutaka2013-02-124-0/+197
| | | | | | | | | | | | | | | | * agent/agent.h (divert_writekey, agent_card_writekey): New. * agent/call-scd.c (inq_writekey_parms, agent_card_writekey): New. * agent/command.c (cmd_keytocard, hlp_keytocard): New. (register_commands): Add cmd_keytocard. * agent/divert-scd.c (divert_writekey): New.
| * Japanese: update po and doc.NIIBE Yutaka2013-02-122-517/+388
| | | | | | | | * doc/help.ja.txt, po/ja.po: Updated.
| * scd: Rename 'keypad' to 'pinpad'.NIIBE Yutaka2013-02-0817-130/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Mention scd changes. * agent/divert-scd.c (getpin_cb): Change message. * agent/call-scd.c (inq_needpin): Change the protocol to POPUPPINPADPROMPT and DISMISSPINPADPROMPT. * scd/command.c (pin_cb): Likewise. * scd/apdu.c (struct reader_table_s): Rename member functions. (check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify, check_ccid_pinpad, ccid_pinpad_operation, apdu_check_pinpad apdu_pinpad_verify, apdu_pinpad_modify): Rename. * scd/apdu.h (SW_HOST_NO_PINPAD, apdu_check_pinpad) (apdu_pinpad_verify, apdu_pinpad_modify): Rename. * scd/iso7816.h (iso7816_check_pinpad): Rename. * scd/iso7816.c (map_sw): Use SW_HOST_NO_PINPAD. (iso7816_check_pinpad): Rename. (iso7816_verify_kp, iso7816_change_reference_data_kp): Follow the change. * scd/ccid-driver.h (CCID_DRIVER_ERR_NO_PINPAD): Rename. * scd/ccid-driver.c (ccid_transceive_secure): Use it. * scd/app-dinsig.c (verify_pin): Follow the change. * scd/app-nks.c (verify_pin): Follow the change. * scd/app-openpgp.c (check_pinpad_request): Rename. (parse_login_data, verify_a_chv, verify_chv3, do_change_pin): Follow the change. * scd/scdaemon.c (oDisablePinpad, oEnablePinpadVarlen): Rename. * scd/scdaemon.h (opt): Rename to disable_pinpad, enable_pinpad_varlen. * tools/gpgconf-comp.c (gc_options_scdaemon): Rename to disable-pinpad.
| * gpg: Add pinentry-mode feature.Werner Koch2013-02-0710-81/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c: Include shareddefs.h. (main): Add option --pinentry-mode. * g10/options.h (struct opt): Add field pinentry_mode. * g10/passphrase.c: Include shareddefs.h. (have_static_passphrase): Take care of loopback pinentry_mode. (read_passphrase_from_fd): Ditto. (get_static_passphrase): New. (passphrase_to_dek_ext): Factor some code out to ... (emit_status_need_passphrase): new. * g10/call-agent.c (start_agent): Send the pinentry mode. (default_inq_cb): Take care of the PASSPHRASE inquiry. Return a proper error code. (agent_pksign): Add args keyid, mainkeyid and pubkey_algo. (agent_pkdecrypt): Ditto. * g10/pubkey-enc.c (get_it): Pass new args. * g10/sign.c (do_sign): Pass new args. * g10/call-agent.c (struct default_inq_parm_s): New. Change all similar structs to reference this one. Change all users and inquire callback to use this struct, instead of NULL or some undefined but not used structs. This change will help to eventually get rid of global variables. -- This new features allows to use gpg without a Pinentry. As a prerequisite the agent must be configured to allow the loopback pinentry mode (option --allow-loopback-pinentry). For example gpg2 --pinentry-mode=loopback FILE.gpg may be used to decrypt FILE.gpg while entering the passphrase on the tty. If batch is used, --passphrase et al. may be used, if --command-fd is used, the passphrase may be provided by another process. Note that there are no try-again prompts in case of a bad passphrase.
| * doc: Fix description for NEED_PASSPHRASE status.Werner Koch2013-02-071-1/+1
| | | | | | | | --
| * agent: Move a typedef to common and provide parse_pinentry_mode.Werner Koch2013-02-065-24/+128
| | | | | | | | | | | | | | | | | | * common/agent-opt.c: New. * common/shareddefs.h: New. * common/Makefile.am: Add new files. * agent/agent.h: Include shareddefs.h. (pinentry_mode_t): Factor out to shareddefs.h. * agent/command.c (option_handler): Use parse_pinentry_mode.
| * agent: Return a better error code if no passphrase was given.Werner Koch2013-02-061-1/+5
| | | | | | | | | | | | | | * agent/protect.c (hash_passphrase): Handle an empty passphrase. -- This is mostly useful in loopback pinentry-mode.
| * scd: Fix check_keypad_request.NIIBE Yutaka2013-02-051-1/+1
| | | | | | | | * scd/app-openpgp.c (check_keypad_request): 0 means not to use pinpad.
| * SCD: Add vendor specific initalization.NIIBE Yutaka2013-02-051-0/+28
| | | | | | | | | | * scd/ccid-driver.c (ccid_vendor_specific_init): New. (ccid_open_reader): Call ccid_vendor_specific_init.
| * SCD: Support P=N format for login data.NIIBE Yutaka2013-02-051-24/+24
| | | | | | | | * scd/app-openpgp.c (parse_login_data): Support P=N format.
| * SCD: Better interoperability.NIIBE Yutaka2013-02-051-2/+2
| | | | | | | | | | | | * scd/apdu.c: Fill bTeoPrologue[2] field. -- ccid-1.4.5 or older requires this field is filled by application.
| * SCD: Defaults to use pinpad if the reader has the capability.NIIBE Yutaka2013-02-051-25/+25
| | | | | | | | | | | | * scd/app-openpgp.c (struct app_local_s): Remove VARLEN. (parse_login_data): "P=0" means to disable pinpad. (check_keypad_request): Default is to use pinpad if available.
| * SCD: handle keypad request on the card.NIIBE Yutaka2013-02-051-6/+104
| | | | | | | | | | | | | | | | | | * scd/app-openpgp.c: Add 2013. (struct app_local_s): Add keypad structure. (parse_login_data): Add parsing keypad request on the card. (check_keypad_request): New. (verify_a_chv, verify_chv3, do_change_pin): Call check_keypad_request to determine use of keypad.
| * SCD: Minor fix of ccid-driver.NIIBE Yutaka2013-02-051-1/+1
| | | | | | | | * scd/ccid-driver.c (VENDOR_VEGA): Fix typo.
| * SCD: Add support of Covadis VEGA_ALPHA reader.NIIBE Yutaka2013-02-051-93/+96
| | | | | | | | | | | | | | * scd/ccid-driver.c: Add 2013. (VENDER_VEGA, VEGA_ALPHA):New. (ccid_transceive_secure): VEGA_ALPHA is same firmware as GEMPC_PINPAD. Change bNumberMessage to 0x01, as it works better (was: 0xff).
| * SCD: Support fixed length PIN input for keypad (PC/SC).NIIBE Yutaka2013-02-052-23/+19
| | | | | | | | | | | | | | * scd/apdu.c (pcsc_keypad_verify): SUpport fixed length PIN input for keypad. (pcsc_keypad_modify): Likewise. * scd/ccid-driver.c (ccid_transceive_secure): Clean up.
| * SCD: Support fixed length PIN input for keypad.NIIBE Yutaka2013-02-056-21/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/iso7816.h (struct pininfo_s): Remove MODE and add FIXEDLEN. * scd/app-dinsig.c (verify_pin): Initialize FIXEDLEN to unknown. * scd/app-nks.c (verify_pin): Likewise. * scd/app-openpgp.c (verify_a_chv, verify_chv3, do_change_pin): Likewise. * scd/apdu.c (check_pcsc_keypad): Add comment. (pcsc_keypad_verify, pcsc_keypad_modify): PC/SC driver only support readers with the feature of variable length input (yet). (apdu_check_keypad): Set FIXEDLEN. * scd/ccid-driver.c (ccid_transceive_secure): Add GEMPC_PINPAD specific settings. Support fixed length PIN input for keypad.
| * SCD: API cleanup for keypad handling.NIIBE Yutaka2013-02-0513-107/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/iso7816.h (struct pininfo_s): Rename from iso7816_pininfo_s. Change meaning of MODE. (pininfo_t): Rename from iso7816_pininfo_t. * scd/sc-copykeys.c: Include "iso7816.h". * scd/scdaemon.c, scd/command.c: Likewise. * scd/ccid-driver.c: Include "scdaemon.h" and "iso7816.h". (ccid_transceive_secure): Follow the change of PININFO_T. * scd/app.c: Include "apdu.h" after "iso7816.h". * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp) (iso7816_change_reference_data_kp): Follow the change of API. * scd/apdu.c (struct reader_table_s): Change API of CHECK_KEYPAD, KEYPAD_VERIFY, KEYPAD_MODIFY to have arg of PININFO_T. (check_pcsc_keypad, check_ccid_keypad): Likewise. (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify): Likewise. (pcsc_keypad_verify, pcsc_keypad_modify, ct_send_apdu) (pcsc_send_apdu_direct, pcsc_send_apdu_wrapped, pcsc_send_apdu) (send_apdu_ccid, ccid_keypad_operation, my_rapdu_send_apdu, send_apdu) (send_le): Follow the change of API. * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify) (apdu_keypad_modify): Change the API. * scd/app-dinsig.c, scd/app-nks.c, scd/app-openpgp.c: Follow the change.
| * SCD: Clean up. Remove PADLEN for keypad input.NIIBE Yutaka2013-02-056-48/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/apdu.c (struct pininfo_s): Use iso7816_pininfo_s. (struct reader_table_s): Remove last arg from check_keypad method. (check_pcsc_keypad, check_pcsc_keypad): Remove PIN_PADLEN. (pcsc_keypad_verify, pcsc_keypad_modify): Don't check PIN_PADLEN. (send_apdu_ccid, ccid_keypad_operation): Remove PIN_PADLEN. (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify): Likewise. * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify) (apdu_keypad_modify): Remove PIN_PADLEN. * scd/ccid-driver.c (ccid_transceive_secure): Remove PIN_PADLEN. * scd/ccid-driver.h (ccid_transceive_secure): Remove PIN_PADLEN. * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp) (iso7816_change_reference_data_kp): Remove PADLEN. * scd/iso7816.h (struct iso7816_pininfo_s): Remove PADLEN, PADCHAR. -- In the OpenPGPcard specification, password comes with no padding. In GnuPG, we support keypad input for OpenPGPcard only. Thus, it is useless to try to support padding for keypad input.
| * SCD: Add option enable-keypad-varlen and support for GEMPC_PINPAD.NIIBE Yutaka2013-02-053-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | * scd/scdaemon.h (opt): Add enable_keypad_varlen. * scd/scdaemon.c (cmd_and_opt_values): Add oEnableKeypadVarlen. (opts, main): Add oEnableKeypadVarlen. * scd/ccid-driver.c (GEMPC_PINPAD): New. (ccid_transceive_secure): Add enable_varlen handling. Enable GEMPC_PINPAD. -- Note that GEMPC_PINPAD doesn't support variable length keypad input. The feature of fixed length keypad input will be added soon.
| * Convert doc/DETAILS to org-modeWerner Koch2013-01-301-869/+958
| | | | | | | | | | -- Also restructure the file and fix some obviously wrong things.
| * Remove unused status codesWerner Koch2013-01-301-3/+0
| | | | | | | | | | * common/status.h (STATUS_BEGIN_STREAM, STATUS_END_STREAM) (STATUS_SIEXPIRED): Remove unused codes.
| * gpg: Add status line PINENTRY_LAUNCHED.Werner Koch2013-01-305-7/+53
| | | | | | | | | | | | | | | | | | * common/status.h (STATUS_PINENTRY_LAUNCHED): New. * g10/server.c (server_local_s): Add field allow_pinentry_notify. (option_handler): Add option "allow-pinentry-notify". (gpg_proxy_pinentry_notify): New. * g10/call-agent.c (default_inq_cb): Factor code out to the new function.
| * agent: Fix a bug of handling return code from npth_join.NIIBE Yutaka2013-01-251-2/+2
| | | | | | | | | | | | | | | | * agent/call-pinentry.c (agent_popup_message_stop): Fix npth_join return code. -- pth_join returns TRUE (1) on success. But npth_join (and pthread_join) returns 0 on success, returns error number on error.
| * gpg: Fix honoring --cert-digest-algo when recreating a certChristian Aistleitner2013-01-111-0/+2
| | | | | | | | | | * g10/sign.c (update_keysig_packet): Override original signature's digest algo in hashed data and for hash computation.
| * Fix spurious cruft from configure summary output.Werner Koch2013-01-111-1/+1
| | | | | | | | * configure.ac (build_scdaemon_extra): Remove $tmp cruft.
| * SCD: Hold lock for pinpad input.NIIBE Yutaka2013-01-111-3/+30
| | | | | | | | | | * scd/apdu.c (apdu_check_keypad, apdu_keypad_verify) (apdu_keypad_modify): Hold lock to serialize communication.
| * SCD: Support not-so-smart card readers.NIIBE Yutaka2013-01-081-37/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/ccid-driver.c (struct ccid_driver_s): Add auto_voltage, auto_param, and auto_pps. (parse_ccid_descriptor): Set auto_voltage, auto_param, and auto_pps. Support non-autoconf readers. (update_param_by_atr): New. (ccid_get_atr): Use 5V for PowerOn when auto_voltage is not supported. Use 0x10 when nonnull_nad for SetParameters. Call update_param_by_atr for parsing ATR, and use param for SetParameters. Send PPS if reader requires it and card is negotiable. When bNadValue in the return values of SetParameters == 0, clear handle->nonnull_nad flag. -- This change is to support more card readers by the internal driver. Tested with 08e6:3478 Gemplus PinPad Smart Card Reader.
| * Update Japanese Translation.NIIBE Yutaka2013-01-071-5/+5
| | | | | | | | | | | | | | | | * po/ja.po: Fix wrong translations for designated revocation. Reported by Hideki Saito. Conflicts: po/ja.po
| * Update Japanese Translation.NIIBE Yutaka2013-01-051-763/+697
| | | | | | | | * po/ja.po: Fix fuzzy translations.
| * Update Japanese Translation.NIIBE Yutaka2013-01-031-681/+2049
| | | | | | | | * po/ja.po: Update with POT.
| * Update Japanese Translation.NIIBE Yutaka2013-01-031-3311/+2293
| | | | | | | | * po/ja.po: Start from the new one of 2.0.