aboutsummaryrefslogtreecommitdiffstats
path: root/scd/command.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 2006-09-01 Marcus Brinkmann <[email protected]>Marcus Brinkmann2006-09-011-3/+31
| | | | | * command.c (cmd_getinfo): Handle status command.
* 2006-08-30 Marcus Brinkmann <[email protected]>Marcus Brinkmann2006-08-301-1/+4
| | | | | | * command.c (do_reset): Delay resetting CTRL->reader_slot until after update_card_removed invocation.
* Updated FSF's address.Werner Koch2006-06-201-1/+2
|
* Added command APDUWerner Koch2006-04-111-0/+128
|
* Allo RMD160 signaturesWerner Koch2006-03-211-3/+25
|
* Fixed card removal problemsWerner Koch2006-03-011-124/+152
|
* PIN caching of cards does now work.Werner Koch2006-02-091-4/+45
|
* The BELPIC card does now work.Werner Koch2005-09-061-1/+1
|
* gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch2005-06-161-5/+5
| | | | | | | char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
* New debugging optionhs, updates to the manual.Werner Koch2005-06-071-1/+2
|
* * command.c (cmd_updatestartuptty): New.Werner Koch2005-06-031-3/+3
| | | | | | | | | | | | | | | | | | | | * gpg-agent.c: New option --write-env-file. * gpg-agent.c (handle_connections): Make sure that the signals we are handling are not blocked.Block signals while creating new threads. * estream.c: Use HAVE_CONFIG_H and not USE_CONFIG_H! (es_func_fd_read, es_func_fd_write): Protect against EINTR. * gpg-agent.texi (Agent UPDATESTARTUPTTY): New. * scdaemon.c (handle_connections): Make sure that the signals we are handling are not blocked.Block signals while creating new threads. (handle_connections): Include the file descriptor into the name of the thread.
* * Makefile.am: Do not build sc-copykeys anymore.Werner Koch2005-05-231-2/+18
| | | | | | * app-openpgp.c (app_openpgp_storekey, app_openpgp_readkey) (app_openpgp_cardinfo): Removed.
* * protect-tool.c: New option --canonical.Werner Koch2005-05-201-2/+79
| | | | | | | | | | | | | | | | | | | | | | | | (show_file): Implement it. * keyformat.txt: Define the created-at attribute for keys. * ccid-driver.c: Replaced macro DEBUG_T1 by a new debug level. (parse_ccid_descriptor): Mark SCR335 firmware version 5.18 good. (ccid_transceive): Arghhh. The seqno is another bit in the R-block than in the I block, this was wrong at one place. * scdaemon.c: New options --debug-ccid-driver and --debug-disable-ticker. * app-openpgp.c (do_genkey, do_writekey): Factored code to check for existing key out into .. (does_key_exist): .. New function. * gpg-connect-agent.c (add_definq, show_definq, clear_definq) (handle_inquire): New. (read_and_print_response): Handle INQUIRE command. (main): Implement control commands.
* Changed the scdaemon to handle concurrent sessions. AdjustedWerner Koch2005-05-181-7/+36
| | | | | gpg-agent accordingly. Code cleanups.
* * configure.ac: Removed OpenSC detection and options.Werner Koch2005-04-271-179/+44
| | | | | | | | | | | | | | | | | | | * acinclude.m4: Ditto. * scdaemon.texi: Removed OpenSC specific options. * app-p15.c: New. Basic support for pkcs15 cards without OpenSC. There are quite a couple of things missing but at least I can use my old TCOS cards from the Aegypten-1 development for signing. * app.c (select_application): Detect pkcs15 applications. * Makefile.am (scdaemon_SOURCES): Removed card.c, card-common.h and card-p15.c because they are now obsolete. Added app-p15.c. Removed all OpenSC stuff. * command.c (do_reset, open_card, cmd_serialno, cmd_learn) (cmd_readcert, cmd_readkey, cmd_pksign, cmd_pkdecrypt): Removed all special cases for the old card.c based mechanisms. * scdaemon.c, apdu.c: Removed all special cases for OpenSC.
* * configure.ac: Do not build gpg by default.Werner Koch2005-04-211-13/+13
| | | | | | | | | | | | * gpgsm.c: New options --{enable,disable}-trusted-cert-crl-check. * certchain.c (gpgsm_validate_chain): Make use of it. * certchain.c (gpgsm_validate_chain): Check revocations even for expired certificates. This is required because on signature verification an expired key is fine whereas a revoked one is not. * gpgconf-comp.c: Add gpgsm option disable-trusted-cert-crl-check.
* (retrieve_key_material): Rewritten. Return aWerner Koch2005-04-141-79/+282
| | | | | | | | | proper error code. (retrieve_next_token): Removed. (retrieve_fpr_from_card): Rewritten to make use of DO caching and to take the KEYNO as arg. (get_public_key): Renamed variable for clarity.
* * app-openpgp.c (do_check_pin): Add hack to allow verification ofWerner Koch2005-04-111-18/+48
| | | | | | | | CHV3. (get_public_key): Don't use gcry functions to create S-expressions. (do_deinit, do_readkey, do_genkey, send_keypair_info): Adjust for above change.
* * call-scd.c (unescape_status_string): New. Actual a copy ofWerner Koch2005-02-241-8/+16
| | | | | | | | | | | | | | | | | | | | | | ../g10/call-agent.c (card_getattr_cb, agent_card_getattr): New. * command-ssh.c (card_key_available): New. (ssh_handler_request_identities): First see whether a card key is available. * app.c (app_getattr): Return APPTYPE or SERIALNO type even if the application does dot support the getattr call. * app.c (select_application): Return an error code and the application context in an new arg. * command.c (open_card): Adjusted for that. Don't use the fallback if no card is present. Return an error if the card has been removed without a reset. (do_reset, cmd_serialno): Clear that error flag. (TEST_CARD_REMOVAL): New. Use it with all command handlers. (scd_update_reader_status_file): Set the error flag on all changes.
* * gpg-agent.c (handle_connections): Need to check for events ifWerner Koch2005-02-241-18/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | select returns with -1. * tools.texi (gpg-connect-agent): New. * app-openpgp.c (get_one_do): Never try to get a non cacheable object from the cache. (get_one_do): Add new arg to return an error code. Changed all callers. (do_getattr): Let it return a proper error code. * app.c (select_application): Return an error code and the application context in an new arg. * command.c (open_card): Adjusted for that. Don't use the fallback if no card is present. Return an error if the card has been removed without a reset. (do_reset, cmd_serialno): Clear that error flag. (TEST_CARD_REMOVAL): New. Use it with all command handlers. * scdaemon.c (ticker_thread): Termintate if a shutdown is pending. * apdu.c: Added some PCSC error codes. (pcsc_error_to_sw): New. (reset_pcsc_reader, pcsc_get_status, pcsc_send_apdu) (open_pcsc_reader): Do proper error code mapping. * gpg-connect-agent.c: New. * Makefile.am: Add it.
* * app-openpgp.c (app_local_s): New field PK.Werner Koch2005-02-221-6/+28
| | | | | | | | | | | (do_deinit, do_genkey, app_openpgp_storekey): Clear it. (get_public_key, send_keypair_info): New. (do_learn_status): Send KEYPAIR info * app-common.h (app_ctx_t): Add function pointer READKEY. * app.c (app_readkey): New. * command.c (cmd_readkey): Use READKEY function if possible.
* * gpg-agent.c (main): Use default_homedir().Werner Koch2004-12-211-3/+1
| | | | | | | | | | | | | | | | | | | * protect-tool.c (main): Ditto. * signal.c (got_fatal_signal, got_usr_signal) (got_fatal_signal) [DOSISH]: Don't build. * simple-gettext.c: Include sysutils.h * homedir.c: New. * Makefile.am (libcommon_a_SOURCES): Add it. (EXTRA_DIST): Removed mkerror and mkerrtok. * gpgv.c, g10.c (main): Use default_hoemdir (). * scdaemon.c (main): Use default_homedir(). * gpgsm.c (main): Use default_homedir().
* A whole bunch of changes to allow building for W32.Werner Koch2004-12-151-0/+5
|
* * command.c (scd_update_reader_status_file): Send a signal back toWerner Koch2004-04-211-2/+44
| | | | | | | | | the client. (option_handler): Parse the new event-signal option. * scdaemon.c (handle_signal): Do not use SIGUSR{1,2} anymore for changing the verbosity.
* * command.c (scd_update_reader_status_file): Write status files.Werner Koch2004-04-201-2/+33
| | | | | | | | | | | | | | * app-help.c (app_help_read_length_of_cert): Fixed calculation of R_CERTOFF. * pcsc-wrapper.c: New. * Makefile.am (pkglib_PROGRAMS): Install it here. * apdu.c (writen, readn): New. (open_pcsc_reader, pcsc_send_apdu, close_pcsc_reader): Use the pcsc-wrapper if we are using Pth. (apdu_send_le): Reinitialize RESULTLEN. Handle SW_EOF_REACHED like SW_SUCCESS.
* * pcsc-wrapper.c: New.Werner Koch2004-04-201-16/+53
| | | | | | | | * Makefile.am (pkglib_PROGRAMS): Install it here. * apdu.c (writen, readn): New. (open_pcsc_reader, pcsc_send_apdu, close_pcsc_reader): Use the pcsc-wrapper if we are using Pth.
* *** empty log message ***Werner Koch2004-03-161-3/+3
|
* * protect-tool.c: New options --have-cert and --prompt.Werner Koch2004-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | (export_p12_file): Read a certificate from STDIN and pass it to p12_build. Detect a keygrip and construct the filename in that case. Unprotcet a key if needed. Print error messages for key formats we can't handle. (release_passphrase): New. (get_passphrase): New arg PROMPTNO. Return the allocated string. Changed all callers. * minip12.c: Revamped the build part. (p12_build): New args CERT and CERTLEN. * simple-pwquery.c (agent_open): Don't mangle INFOSTR. * export.c (export_p12, popen_protect_tool) (gpgsm_p12_export): New. * gpgsm.c (main): New command --export-secret-key-p12.
* (reset_notify): Release the application context andWerner Koch2004-01-291-2/+3
| | | | | close the reader.
* Some minor bug fixes, new test utilities and started support for otherWerner Koch2004-01-271-44/+83
| | | | | smartcard applications.
* Replaced deprecated type names.Werner Koch2003-12-171-2/+2
| | | | | | * card-p15.c (p15_enum_keypairs): Replaced KRC by RC. * card-dinsig.c (dinsig_enum_keypairs): Ditto.
* Mainly changes to adjust for the changed KSBA API.Werner Koch2003-11-121-7/+5
|
* * command.c (cmd_genkey, cmd_passwd): Fixed faulty use ofWerner Koch2003-10-251-4/+4
| | | | | | | !spacep(). * apdu.c (apdu_open_reader): Hacks for PC/SC under Windows.
* * command.c (cmd_checkpin): New.Werner Koch2003-10-211-0/+36
| | | | | | | | | (register_commands): Add command CHECKPIN. * app.c (app_check_pin): New. * app-openpgp.c (check_against_given_fingerprint): New. Factored out that code elsewhere. (do_check_pin): New.
* * command.c (cmd_getattr): New command GETATTR.Werner Koch2003-09-301-0/+36
| | | | | | | | | | | | | | | | * app.c (app_setattr): New. (do_getattr): New. (do_learn_status): Reimplemented in terms of do_getattr. * app-openpgp.c (do_change_pin): Make sure CVH1 and CHV2 are always synced. (verify_chv2, verify_chv3): New. Factored out common code. (do_setattr, do_sign, do_auth, do_decipher): Change the names of the prompts to match that we have only 2 different PINs. (app_select_openpgp): Check whether the card enforced CHV1. (convert_sig_counter_value): New. Factor out code from get_sig_counter.
* (cmd_setattr): Use a copy of LINE.Werner Koch2003-08-251-11/+25
| | | | | | | (cmd_genkey): Use a copy of KEYNO. (cmd_passwd): Use a copy of CHVNOSTR. (cmd_pksign, cmd_pkauth, cmd_pkdecrypt): s/strdup/xtrystrdup/.
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-08-051-0/+1034
| | | | 'GNUPG-1-9-BRANCH'.
* This commit was manufactured by cvs2svn to create branchRepo Admin2002-10-191-651/+0
| | | | 'GNUPG-1-9-BRANCH'.
* * scdaemon.c: Include i18n.h.Werner Koch2002-08-161-1/+39
| | | | | | | | | | | | | | * card-common.h (struct p15_private_s): Forward declaration. Add it to card_ctx_s. * card.c (card_close): Make sure private data is released. (card_enum_certs): New. * card-p15.c (p15_release_private_data): New. (init_private_data): New to work around an OpenSC weirdness. (p15_enum_keypairs): Do an OpenSC get_objects only once. (p15_enum_certs): New. (card_p15_bind): Bind new function. * command.c (cmd_learn): Return information about the certificates.
* * call-agent.c (start_agent): Make copies of old locales and checkWerner Koch2002-04-251-4/+4
| | | | | | | for setlocale. * configure.ac: Check for setlocale.
* * command.c (cmd_pksign, cmd_pkdecrypt): Use a copy of the key ID.Werner Koch2002-04-151-2/+15
|
* Doc fixes, moved some fizmes to TODO, fixed minor bugs.Werner Koch2002-03-181-16/+10
|
* sm/Werner Koch2002-03-061-0/+61
| | | | | | | | | | | | | | | | | * gpgsm.c: New command --learn-card * call-agent.c (learn_cb,gpgsm_agent_learn): New. * gpgsm.c (main): Print error messages for non-implemented commands. agent/ * learncard.c: New. * divert-scd.c (ask_for_card): The serial number is binary so convert it to hex here. * findkey.c (agent_write_private_key): New. * genkey.c (store_key): And use it here. scd/ * pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done. * divert-scd.c (divert_pkdecrypt): Changed interface and implemented it.
* Decryption using a Cryptoflex card does now work.Werner Koch2002-03-061-0/+35
|
* Well and some stuff to access the SC will be helpful. Note, that theWerner Koch2002-03-051-1/+55
| | | | | code requires the latest OpenSC CVS code.
* Added more code fragments.Werner Koch2002-03-041-14/+121
|
* Changes needed to support smartcards. Well, only _support_. There isWerner Koch2002-02-281-25/+131
| | | | | no real code yet.
* Some experimental code - don't use it.Werner Koch2002-02-181-14/+83
|
* * scdaemon.c scdaemon.h, command.c: New. Based on the code fromWerner Koch2002-01-261-0/+174
the gpg-agent.