aboutsummaryrefslogtreecommitdiffstats
path: root/scd/scdaemon.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2005-06-03* command.c (cmd_updatestartuptty): New.Werner Koch1-7/+26
* 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.
2005-06-01* configure.ac (gl_INIT): Add gnulib stuff.Werner Koch1-1/+1
(fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS by a simple check. (putc_unlocked): Removed check. Not used. (strsep, mkdtemp, asprintf): Replaced checks by gnulib checks. (xsize): Added will probably come handy soon. (CFLAGS): Use -Wformat-security instead of -Wformat-nonliteral. Add --Wno-format-y2k. * gl/, gl/m4/: New. * gpg-agent.c: Include setenv.h. * Makefile.am (AM_CPPFLAGS): Added. * util.h: Add some includes for gnulib. (ttyname, isascii): Define them inline. * fseeko.c, ftello.c: Removed. * strsep.c, mkdtemp.c: Removed. * ttyname.c, isascii.c: Removed. * mkdtemp.c: Removed. * exec.c: Include mkdtemp.h * keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement function. Copied from ../common/ftello.c. * keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement function. Copied from ../common/iobuf.c. * scdaemon.c: Include mkdtemp.h. * misc.c: Include setenv.h. * symcryptrun.c: Include mkdtemp.h.
2005-05-21* call-scd.c (start_scd): Don't test for an alive scdaemon here.Werner Koch1-1/+2
(agent_scd_check_aliveness): New. * gpg-agent.c (handle_tick): Test for an alive scdaemon. (handle_signal): Print thread info on SIGUSR1. * scdaemon.c (handle_signal): Print thread info on SIGUSR1.
2005-05-20* protect-tool.c: New option --canonical.Werner Koch1-12/+21
(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.
2005-05-18Changed the scdaemon to handle concurrent sessions. AdjustedWerner Koch1-169/+322
gpg-agent accordingly. Code cleanups.
2005-04-27* configure.ac: Removed OpenSC detection and options.Werner Koch1-21/+6
* 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.
2005-02-24* gpg-agent.c (handle_connections): Need to check for events ifWerner Koch1-1/+2
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.
2004-12-21* gpg-agent.c (main): Use default_homedir().Werner Koch1-13/+3
* 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().
2004-12-19* query.c (initialize_module_query):Werner Koch1-0/+5
* call-scd.c (initialize_module_call_scd): New. * w32-pth.c (pth_init): Enable debugging depending on env var. (pth_self): New. (pth_mutex_release, pth_mutex_acquire): Implemented directly using the W32 API.
2004-12-18* configure.ac (AH_BOTTOM): Define EXEEXT_S.Werner Koch1-6/+0
* autogen.sh: Updated --build-w32 feature. * gpg-agent.c (main): Remove special Pth initialize. * w32-pth.c (pth_init): Reverse return values. Use TRUE and FALSE constants. (pth_kill, pth_mutex_acquire, pth_attr_set, pth_join, pth_cancel): Ditto. * scdaemon.c (main) [W32]: Remove special Pth initialize..
2004-12-15A whole bunch of changes to allow building for W32.Werner Koch1-1/+39
2004-08-05* configure.ac: Changed tests for libusb to also suuport theWerner Koch1-0/+6
stable version 0.1.x. * scdaemon.texi (Card applications): New section. * scdaemon.c (main): New option --disable-application. * app.c (is_app_allowed): New. (select_application): Use it to check for disabled applications. * 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.
2004-07-22* configure.ac: Define AM conditional HAVE_OPENSC.V1-9-10Werner Koch1-1/+8
* Makefile.am: Make OpenSC lib link after libgcrypt. Do not link to pth. * apdu.c: Don't use Pth if we use OpenSC. * sc-investigate.c, scdaemon.c: Disable use of pth if OpenSC is used. * scdaemon.c (main): Bumbed thread stack size up to 512k.
2004-07-22* trustlist.c (read_list): Allow colons in the fingerprint.Werner Koch1-1/+1
(headerblurb): Rephrased. * gpg-agent.c (handle_connections): Increase the stack size ot 256k. * de.po: Updated. * scdaemon.c (main): Bumbed thread stack size up to 512k. * keylist.c (list_cert_raw): Print the keygrip.
2004-04-26* scdaemon.c (main): Do the last change the usual way. This is soWerner Koch1-5/+3
that we can easily test for versioned config files above. * gpgsm.c (main) <gpgconf>: Do not use /dev/null as default config filename.
2004-04-262004-04-26 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-3/+7
* scdaemon.c (main): For now, always print default filename for --gpgconf-list, and never /dev/null.
2004-04-21* command.c (scd_update_reader_status_file): Send a signal back toWerner Koch1-6/+2
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.
2004-04-20* pcsc-wrapper.c: New.Werner Koch1-2/+152
* 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.
2004-04-06* configure.ac: Require libgcrypt 1.1.94.Werner Koch1-3/+3
Introduce PACKAGE_GT and set it to gnupg2. * gpg-agent.c (main): Use new libgcrypt thread library register scheme. * Makevars (DOMAIN): Init from PACKAGE_GT
2004-03-23(main) <gpgconf_list>: Fixed output for pcsc_driver.Werner Koch1-1/+1
2004-03-17* gpg-agent.c (main) <gpgconf>: Fixed default value quoting.Werner Koch1-2/+2
* scdaemon.c (main) <gpgconf>: Fixed default value quoting. * gpgsm.c (main) <gpgconf>: Fixed default value quoting.
2004-03-16* app-dinsig.c: Implemented. Based on app-nks.c and card-dinsig.cWerner Koch1-16/+51
* app-nks.c (get_length_of_cert): Removed. * app-help.c: New. (app_help_read_length_of_cert): New. Code taken from above. New optional arg R_CERTOFF. * card-dinsig.c: Removed. * card.c (card_get_serial_and_stamp): Do not bind to the old and never finsiged card-dinsig.c. * iso7816.c (iso7816_read_binary): Allow for an NMAX > 254.
2004-02-18* sc-investigate.c (main): Setup the used character set.Werner Koch1-7/+80
* scdaemon.c (main): Ditto. * scdaemon.c (set_debug): New. Add option --debug-level. (main): Add option --gpgconf-list.
2004-01-27Some minor bug fixes, new test utilities and started support for otherWerner Koch1-2/+2
smartcard applications.
2003-12-16(main): Set the prefixes for assuan logging.Werner Koch1-0/+4
2003-12-01* scdaemon.c, scdaemon.h: New options --allow-admin and --deny-admin.Werner Koch1-2/+7
* app-openpgp.c (verify_chv3): Check it here.
2003-09-06* configure.ac: Required newer versions of some libraries.V1-9-1Werner Koch1-2/+1
* misc.c (openpgp_pk_algo_usage): Allow AUTH where SIGN is allowed. * keygen.c (ask_passphrase): No need to allocated S2K in secure memory. * scdaemon.c (main): --pcsc-driver again defaults to pcsclite. David Corcoran was so kind to remove the GPL incompatible advertisng clause from pcsclite. * apdu.c (apdu_open_reader): Actually make pcsc-driver option work.
2003-09-02* configure.ac (HAVE_LIBUSB): Added a simple test for libusb.Werner Koch1-2/+11
* scdaemon.c, scdaemon.h: New option --pcsc-ccid. * ccid-driver.c, ccid-driver.h: New but far from being useful. * Makefile.am: Add above. * apdu.c: Add support for that ccid driver.
2003-08-19* scdaemon.c, scdaemon.h: New option --pcsc-driver.Werner Koch1-1/+9
* apdu.c (apdu_open_reader): Use that option here instead of a hardcoded one.
2003-08-18* Makefile.am: Add OPENSC_LIBS to all programs.Werner Koch1-0/+12
* scdaemon.c, scdaemon.h: New option --disable-opensc. * card.c (card_open): Implement it. * apdu.c (open_osc_reader, osc_send_apdu): New. (apdu_open_reader) [HAVE_OPENSC]: Use the opensc driver if not disabled. (error_string) [HAVE_OPENSC]: Use sc_strerror. (send_apdu) [HAVE_OPENSC]: Call osc_apdu_send.
2003-08-05Cleanups, fixes and PC/SC supportWerner Koch1-5/+7
2003-08-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+638
'GNUPG-1-9-BRANCH'.
2003-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-2/+2
2003-06-03Make use of libgpg-errorWerner Koch1-12/+0
2003-04-29* scdaemon.c: New options --print-atr and --reader-portWerner Koch1-2/+19
* apdu.c, apdu.h: New * card.c, card-p15.c, card-dinsig.c: Allow build without OpenSC.
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-633/+0
'GNUPG-1-9-BRANCH'.
2002-08-21use setlocale().Werner Koch1-3/+3
2002-08-21* scdaemon.c (main): New option --daemon so that the program isWerner Koch1-4/+13
not accidently started in the background.
2002-08-16* scdaemon.c: Include i18n.h.Werner Koch1-3/+1
* 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.
2002-08-10Minor changes for gettextNEWPG-0-3-10Werner Koch1-1/+1
2002-08-09* card.c (card_get_serial_and_stamp): Use the tokeinfo serialWerner Koch1-2/+2
number as a fallback. Add a special prefix for serial numbers.
2002-06-27* gpgsm.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.Werner Koch1-7/+1
* call-agent.c (start_agent): Create and pass the list of FD to keep in the child to assuan. * call-dirmngr.c (start_dirmngr): Ditto. * scdaemon.c (main): Use GNUPG_DEFAULT_HOMEDIR constant. * assuan-pipe-connect.c (assuan_pipe_connect): No special handling for the log_fd and stderr. Connect stderr to /dev/null if it should not be retained.
2002-04-12* scdaemon.c: New option --debug-sc N.Werner Koch1-0/+3
* card.c (card_open): set it here. * card-p15.c (p15_prepare_key): Factored out common code from ... (p15_sign, p15_decipher): here and made the decryption work the regular way.
2002-02-28Changes needed to support smartcards. Well, only _support_. There isWerner Koch1-0/+2
no real code yet.
2002-01-26* scdaemon.c scdaemon.h, command.c: New. Based on the code fromWerner Koch1-30/+32
the gpg-agent.
2002-01-20* command.c (cmd_get_passphrase): Remove the plus signs.Werner Koch1-3/+1
* query.c (start_pinentry): Send no-grab option to pinentry * gpg-agent.c (main): Move variable grab as no_grab to agent.h.
2002-01-19* gpg-agent.c (main): Disable core dumps.Werner Koch1-1/+3
* cache.c: New. * command.c (cmd_get_passphrase): Use the cache. (cmd_clear_passphrase): Ditto. * gpg-agent.c: Removed unused cruft and implement the socket based server. (my_strusage): Take bug report address from configure.ac. * command.c (start_command_handler): Add an argument to start as regular server. (start_command_handler): Enable Assuan logging.
2002-01-19* gpg-agent.c: Removed unused cruft and implement the socketWerner Koch1-638/+183
based server. (my_strusage): Take bug report address from configure.ac. * command.c (start_command_handler): Add an argument to start as regular server. (start_command_handler): Enable Assuan logging.
2001-12-14* gpg-agent.c (main): New option --batch. New option --debug-waitWerner Koch1-0/+14
n, so that it is possible to attach gdb when used in server mode. * query.c (agent_askpin): Don't ask in batch mode.
2001-12-10The Agent does now call the pin entry program; however because we haveWerner Koch1-1/+9
not yet implemeted secret key protection, its purpose is somewhat limited. Well, the PIN entry modules can now be tested.