aboutsummaryrefslogtreecommitdiffstats
path: root/g10/app-openpgp.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2006-06-28Fixed uploading of keays.Werner Koch1-1/+1
2006-01-01* sign.c (hash_for): Add code to detect if the sk lives on a smartDavid Shaw1-1/+5
card. If it does, only allow 160-bit hashes, a la DSA. This involves passing the *sk in, so change all callers. This is correct for today, given the current 160-bit q in DSA, and the current SHA-1/RIPEMD160 support in the openpgp card. It will almost certainly need changing down the road. * app-openpgp.c (do_sign): Give user error if hash algorithm is not supported by the card.
2005-06-18(parse_signature): Use log_info for messagesWerner Koch1-1/+1
about missing timestamp or keyid. In case we don't use that key there won't be no further error and thus gpg does not need to return with an error.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-05-24* passphrase.c (ask_passphrase): Unescape the description string.Werner Koch1-2/+2
* cardglue.c (unescape_status_string): Removed. Changed all caller to use ... * misc.c (unescape_percent_string): New.
2005-05-23* app-openpgp.c, app-common.h: Again updated from gnupg 1.9 CVS.Werner Koch1-212/+0
* cardglue.c (open_card): Check USE_AGENT. (agent_scd_checkpin): Implemented Assuan part. (agent_scd_change_pin): Ditto.
2005-05-21* cardglue.c (send_status_info): Make CTRL optional.Werner Koch1-33/+318
(agent_scd_writekey, inq_writekey_parms): New. (agent_openpgp_storekey): Removed. * cardglue.h: Add a few more error code mappings. * keygen.c (copy_mpi): Removed. (save_unprotected_key_to_card): Changed to use agent_scd_writekey. * app-common.h, app-openpgp.c, tlv.c, tlv.h: Updated from newer version in gnupg 1.9 CVS.
2005-05-20(ccid_transceive): Arghhh. The seqno is anotherWerner Koch1-73/+572
bit in the R-block than in the I block, this was wrong at one place. Fixes bug #419 and hopefully several others.
2005-04-07* ccid-driver.c (ccid_slot_status): Fixed debug messages.Werner Koch1-2/+43
* card-util.c (card_edit): Add command "verify". Enhanced admin command to allow optional arguments "on", "off" and "verify". (card_status): Print private DOs in colon mode. * app-openpgp.c (do_check_pin): Add hack to allow verification of CHV3.
2005-03-30(pin_cb): Print a warning if the info string hack isWerner Koch1-1/+1
not there. This may happen due to typos in the translation.
2005-01-25(get_cached_data): New arg GET_IMMEDIATE to bypassWerner Koch1-36/+33
the cache. Changed all callers. (get_one_do): Bypass the cache if the value would have been read directly for v1.1 cards.It makes things a bit slower but obnly for 1.0 cards and there are not that many cards out in the wild. This is required to fix a caching bug when generating new keys; as a side effect of the retrieval of the the C4 DO from the 6E DO the chaced fingerprint will get updated to the old value and later when signing the generated key the checking of the fingerprint fails becuase it won't match the new one. Thanks to Moritz for analyzing this problem. (verify_chv3): Removed the CHV status reread logic because we won't cache the C4 DO anymore.
2004-12-10* app-openpgp.c (send_fprtime_if_not_null): New.Werner Koch1-1/+28
(do_getattr): Add KEY_TIME. (do_learn_status): Print KEY_TIME. * cardglue.c (learn_status_cb): Parse KEY-TIME. * card-util.c (card_status): Print creation time if available.
2004-12-09* passphrase.c (agent_get_passphrase): New args CUSTOM_PROMPT andWerner Koch1-12/+44
CUSTOM_DESCRIPTION. Changed all callers. * app-openpgp.c (do_getattr, do_learn_status, do_setattr): Support the new private DOs. (do_change_pin): Add a "N" prefix to the strings so that the callback can act accordingly for a new PIN. Unfortunately this breaks existing translations but I see no wother way to overvome this. * cardglue.c (learn_status_cb): Ditto. (agent_release_card_info): Ditto. (struct pin_cb_info_s): Removed and changed all users. (pin_cb): Reworked. * card-util.c (card_status): Print them (card_edit): New command PRIVATEDO. (change_private_do): New.
2004-11-17(open_info_file): New.Werner Koch1-18/+25
(main): Unconditionally implement --status-file, --logger-file, --attribute-file, --passphrase-file, --command-file. This is not generally useful but easy to support and might make scripting under Windows easier.
2004-10-26(verify_chv3): The minimum length for CHV3 isWerner Koch1-3/+3
8. Changed string to match the other ones.
2004-10-21* options.h, g10.c (main), mainproc.c (check_sig_and_print): RenameDavid Shaw1-1/+1
verify-option show-validity to show-uid-validity to match the similar list-option. * app-openpgp.c (verify_chv3): Fix typo.
2004-10-21* configure.ac: Remove the check for asprintfWerner Koch1-1/+6
* app-common.h (app_openpgp_storekey: Add prototype. * app-openpgp.c (do_sign): Replace asprintf by direct allocation. This avoids problems with missing vasprintf implementations. * card-util.c (generate_card_keys): Add a #warning for gnupg 1.9 and use the same string there. * util.h [!HAVE_VASPRINTF]: Removed prototype. * vasprintf.c: Removed. It was used only at one place and I don't want to get into build problems in 1.4.
2004-10-15* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New.Werner Koch1-32/+111
(AUTOMAKE_OPTIONS): New. * configure.ac: Check whether vasprintf needs a replacement. * app-openpgp.c (parse_login_data): New. (app_select_openpgp): Call it. (do_setattr): Reparse it after change. * Makefile.am: Add ksutil.h.
2004-10-01* mk-w32-dist: Updated from stable branch.Werner Koch1-1/+1
* mk-gpg-texi: Changed to use the newer docbook2x-texi utility. * config.guess, config.sub, mkinstalldirs, missing * depcomp, install-sh: Upgraded.
2004-09-27* card-util.c (card_edit): Take admin only status from the table.Werner Koch1-19/+60
* app-openpgp.c: Made all strings translatable. (verify_chv3) [GNUPG_MAJOR_VERSION]: Make opt.allow_admin available for use in gnupg 2. (verify_chv3): Reimplemented countdown showing to use only functions from this module. Flush the CVH status cache on a successful read. (get_one_do): Hack to bypass the cache for cards versions > 1.0. (store_fpr): Store the creation date for card version > 1.0.
2004-09-27We need to take care that several files are also used in gnupg 1.9 andWerner Koch1-42/+60
there by the scdaemon which is a bit different to the direct integration in gpg 1.3. In general they should all be maintained in 1.9 but while preparing 1.4 its okay to do it in 1.3. We just need to take some care not to break 1.9 to heavily. app-openpgp.c: Made all strings translatable. (verify_chv3) [GNUPG_MAJOR_VERSION]: Make opt.allow_admin available for use in gnupg 2. (verify_chv3): Reimplemented countdown showing to use only functions from this module.
2004-09-25* main.h, g10.c (main), card-util.c (change_pin): If "admin" has not beenDavid Shaw1-8/+20
issued, skip right to the CHV1/CHV2 PIN change. No need to show the unblock or admin PIN change option. (card_edit): Add "admin" command to add admin commands to the menu. Do not allow admin commands until "admin" is given. * app-openpgp.c (verify_chv3): Show a countdown of how many wrong admin PINs can be entered before the card is locked. * options.h, g10.c (main), app-openpgp.c (verify_chv3): Remove --allow-admin.
2004-09-23Note: I have not fully tested the new key creation due to a pc/scWerner Koch1-39/+87
error. However the backupfile has been created successfully. * rsa.c (rsa_generate): Return the dummy list of factors only if the caller asked for it. * card_util.c (generate_card_keys): ask whether backup should be created. (card_store_subkey): Factored some code out to .. * keygen.c (save_unprotected_key_to_card): .. new function. (gen_card_key_with_backup): New. (generate_raw_key): New. (generate_keypair): New arg BACKUP_ENCRYPTION_DIR. Changed all callers. (do_generate_keypair): Divert to gen_card_key_with_backup when desired.
2004-09-23* gpg.sgml: Document "addcardkey" and "keytocard".Werner Koch1-1/+1
* apdu.c (open_pcsc_reader): Do not print empty reader string. * keygen.c (ask_algo): Allow creation of AUTH keys. * keyid.c (usagestr_from_pk): New. * app-openpgp.c (app_openpgp_storekey): Call flush_cache. * keyedit.c (keyedit_menu): New command "keytocard" (keyedit_menu): Bad hack for the not_with_sk element. (show_key_with_all_names): Print the usage. (find_pk_from_sknode): New. * card-util.c (card_store_subkey): New. (copy_mpi): New. * cardglue.c (agent_openpgp_storekey): New.
2004-09-11* app-openpgp.c (get_cached_data): Avoid mallocing zero since it breaks usDavid Shaw1-8/+12
when using --enable-m-guard.
2004-09-09* README: Doc --disable-card-support and --without-readline.Werner Koch1-2/+2
* configure.ac: Check for readline. Make enable-card-support the default. New option --without-readline. Allow the use of either the development or the stable libusb. * cardglue.h: Add members for CA fingerprints. * cardglue.c (agent_release_card_info): Invalid them. (learn_status_cb): Store them. * app-common.h, app-openpgp.c, iso7816.c, iso7816.h * apdu.c, apdu.h, ccid-driver.c, ccid-driver.h * card-util.c: Updated from current gnupg-1.9. * ccid-driver.h (CCID_DRIVER_ERR_ABORTED): New. * ccid-driver.c (ccid_open_reader): Support the stable 0.1 version of libusb. (ccid_get_atr): Handle short messages. * apdu.c (my_rapdu_get_status): Implemented. * apdu.c: Include <signal.h>. * apdu.c (reader_table_s): Add function pointers for the backends. (apdu_close_reader, apdu_get_status, apdu_activate) (send_apdu): Make use of them. (new_reader_slot): Intialize them to NULL. (dump_ccid_reader_status, ct_dump_reader_status): New. (dump_pcsc_reader_status): New. (open_ct_reader, open_pcsc_reader, open_ccid_reader) (open_osc_reader, open_rapdu_reader): Intialize function pointers. (ct_activate_card, ct_send_apdu, pcsc_send_apdu, osc_send_apdu) (error_string): Removed. Replaced by apdu_strerror. (get_ccid_error_string): Removed. (ct_activate_card): Remove the unused loop. (reset_ct_reader): Implemented. (ct_send_apdu): Activate the card if not yet done. (pcsc_send_apdu): Ditto. * ccid-driver.h: Add error codes. * ccid-driver.c: Implement more or less proper error codes all over the place. * apdu.c (apdu_send_direct): New. (get_ccid_error_string): Add some error code mappings. (send_apdu): Pass error codes along for drivers already supporting them. (host_sw_string): New. (get_ccid_error_string): Use above. (send_apdu_ccid): Reset the reader if it has not yet been done. (open_ccid_reader): Don't care if the ATR can't be read. (apdu_activate_card): New. (apdu_strerror): New. (dump_reader_status): Only enable it with opt.VERBOSE. * iso7816.c (map_sw): Add mappings for the new error codes. * apdu.c (open_ct_reader, open_pcsc_reader, open_ccid_reader) (reset_ccid_reader, open_osc_reader): Call dump_reader_status only in verbose mode. * app-openpgp.c (do_getattr): Fix for sending CA-FPR. * app-openpgp.c (app_openpgp_readkey): Fixed check for valid exponent. * app-openpgp.c (do_setattr): Sync FORCE_CHV1. * card-util.c (change_login): Kludge to allow reading data from a file. (card_edit): Pass ARG_STRING to change_login. (card_status): Print CA fingerprints. (change_cafpr): New. (card_edit): New command CAFPR. * errors.h (G10ERR_NO_CARD, G10ERR_CANCELED): New error codes. * errors.c (g10_errstr): New error codes G10ERR_NO_CARD, G10ERR_CANCELED.
2004-04-28* card-util.c (card_edit): Require PIN only for generate.Werner Koch1-1/+5
* app-openpgp.c (do_setattr): Sync FORCE_CHV1.
2004-04-27A bunch of changes for the openpgp card.Werner Koch1-134/+258
2003-10-21* passphrase.c (ask_passphrase): Add optional promptid arg.Werner Koch1-51/+86
Changed all callers. * cardglue.c (pin_cb): Use it here, so the machine interface can tell whether the Admin PIN is requested. * cardglue.c (agent_scd_checkpin): New. * misc.c (openpgp_pk_algo_usage): Added AUTH usage. * app-openpgp.c (check_against_given_fingerprint): New. Factored out that code elsewhere. (do_check_pin): New. * card-util.c (card_edit): New command "passwd". Add logic to check the PIN in advance. (card_status): Add new args to return the serial number. Changed all callers.
2003-10-08* cardglue.c (pin_cb): Detect whether an admin or regular PIN isWerner Koch1-0/+25
requested. (genkey_status_cb): New. (agent_scd_genkey): Implemented. * keygen.c (generate_keypair): New arg CARD_SERIALNO and prepare parameters for on card key generation. Changed all callers. (do_generate_keypair): Add new arg card and merged casrd specific changes from 1.9. (proc_parameter_file): New arg card, apss it down to do_generate_keypair and changed all callers. (gen_card_key): New. * g10.c: Include cardclue.h. (main): s/app_set_default_reader_port/card_set_reader_port/. * cardglue.c (card_set_reader_port): New to address include file issues.
2003-10-02* cardglue.c (learn_status_cb): Release values before assignmentWerner Koch1-241/+263
so that it can be used by getattr to update the structure. (agent_scd_getattr): New. * keylist.c (print_pubkey_info): Add FP arg for optional printing to a stream. Changed all callers.
2003-09-28* g10.c (main): New commands --card-edit, --card-status andWerner Koch1-105/+53
--change-pin. New options --ctapi-driver, --pcsc-driver and --disable-ccid * options.h (DBG_CARD_IO): New. * cardglue.c, cardclue.h: Enhanced. * card-util.c: New. Taken from current the gnupg 1.9 branch. * app-common.h, app-openpgp.c, iso7816.c, iso7816.h, apdu.c * apdu.h, ccid-driver.c, ccid-driver.h: New. Takem from the current gnupg 1.9 branch withy minor changes to include directives. * Makefile.am: Added these files.
2003-08-05Cleanups, fixes and PC/SC supportWerner Koch1-101/+34
2003-08-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+1482
'GNUPG-1-9-BRANCH'.
2003-07-29*** empty log message ***Werner Koch1-1/+1
2003-07-29* gpgsm.c (main): Add secmem features and set the random seed file.Werner Koch1-32/+30
(gpgsm_exit): Update the random seed file and enable debug output. * g10.c (main): Add secmem features and set the random seed file. (g10_exit): Update the random seed file. * parse-packet.c (parse_signature,read_protected_v3_mpi) (parse_key): Fixed use of mpi_set_opaque. * keygen.c (gen_card_key): Ditto.
2003-07-24* app-openpgp.c (do_learn_status): Print more status information.Werner Koch1-7/+51
(app_select_openpgp): Store the card version. (store_fpr): Add argument card_version and fix DOs for old cards. (app_openpgp_storekey): Likewise.
2003-07-23* command.c (cmd_pkauth): New.Werner Koch1-2/+199
(cmd_setdata): Check whether data was given at all to avoid passing 0 to malloc. * app.c (app_auth): New. * app-openpgp.c (do_auth): New.
2003-07-16* Makefile.am: Add sc-copykeys program.Werner Koch1-6/+250
* sc-copykeys.c: New. * app-openpgp.c (app_openpgp_storekey): New. (app_openpgp_cardinfo): New. (count_bits): New. (store_fpr): And use it here to get the actual length in bit.
2003-07-03* app-openpgp.c (do_setattr): Add setting of the URL.Werner Koch1-17/+172
(app_select_openpgp): Dump card data only in very verbose mode. (do_decipher): New.
2003-07-01* app-openpgp.c (store_fpr): Fixed fingerprint calculation.Werner Koch1-11/+111
* keygen.c (gen_card_key): Obviously we should use the creation date received from SCDAEMON, so that the fingerprints will match. * sign.c (do_sign): Pass the serialno to the sign code. * keyid.c (serialno_and_fpr_from_sk): New.
2003-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-44/+346
2003-06-03* scdaemon.h: Include gpg-error.h and errno.hWerner Koch1-0/+442
* card.c (map_sc_err): Use unknown for the error source. * Makefile.am: Link with libgpg-error