1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-02 22:38:02 +02:00
Commit Graph

73 Commits

Author SHA1 Message Date
Werner Koch
c4e52b1531 Initialize Pth which is now required.
(interactive_shell): New command "readpk".
2004-07-01 18:09:25 +00:00
Werner Koch
bcaa520ad6 (do_getattr): Fix for sending CA-FPR. 2004-07-01 17:41:33 +00:00
Werner Koch
8b3cf19e24 * sc-investigate.c (my_read_line): Renamed from read_line. 2004-06-21 06:53:30 +00:00
Werner Koch
a4ef559d6c (osc_get_status): Fixed type in function name. Noted by
Axel Thimm.  Yes, I didn't tested it with OpenSC :-(.
2004-06-16 12:38:01 +00:00
Werner Koch
7d486a0969 * app-openpgp.c (do_setattr): Sync FORCE_CHV1. 2004-04-29 17:25:57 +00:00
Werner Koch
4c96cb0683 * app-common.h: Do not include ksba.h for gnupg 1. 2004-04-28 09:00:05 +00:00
Werner Koch
869a2bbad2 * app-common.h: New members FNC.DEINIT and APP_LOCAL.
* app.c (release_application): Call new deconstructor.
* app-openpgp.c (do_deinit): New.
(get_cached_data, flush_cache_item, flush_cache_after_error)
(flush_cache): New.
(get_one_do): Replaced arg SLOT by APP.  Make used of cached data.
(verify_chv2, verify_chv3): Flush some cache item after error.
(do_change_pin): Ditto.
(do_sign): Ditto.
(do_setattr): Flush cache item.
(do_genkey): Flush the entire cache.
(compare_fingerprint): Use cached data.
2004-04-26 18:28:06 +00:00
Werner Koch
5fa53f7524 * scdaemon.c (main): Do the last change the usual way. This is so
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-26 13:46:36 +00:00
Marcus Brinkmann
1101deced5 2004-04-26 Marcus Brinkmann <marcus@g10code.de>
* scdaemon.c (main): For now, always print default filename for
	--gpgconf-list, and never /dev/null.
2004-04-26 13:07:08 +00:00
Werner Koch
4624e9dfb3 * command.c (scd_update_reader_status_file): Send a signal back to
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-21 14:44:09 +00:00
Werner Koch
78f797d11d * command.c (scd_update_reader_status_file): Write status files.
* 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.
2004-04-20 16:42:55 +00:00
Werner Koch
e950b01ff5 * 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.
2004-04-20 14:17:10 +00:00
Werner Koch
d84d632583 * configure.ac: Require libgcrypt 1.1.94.
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-04-06 10:01:04 +00:00
Werner Koch
0c36e10633 (main) <gpgconf_list>: Fixed output for pcsc_driver. 2004-03-23 12:33:20 +00:00
Werner Koch
d714e81e58 * gpg-agent.c (main) <gpgconf>: Fixed default value quoting.
* scdaemon.c (main) <gpgconf>: Fixed default value quoting.
* gpgsm.c (main) <gpgconf>: Fixed default value quoting.
2004-03-17 13:01:16 +00:00
Werner Koch
e209ea3c39 * app-dinsig.c: Implemented. Based on app-nks.c and card-dinsig.c
* 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-03-16 18:59:21 +00:00
Werner Koch
f8d44bc637 *** empty log message *** 2004-03-16 10:49:37 +00:00
Werner Koch
a1b487a17a * protect-tool.c: New options --have-cert and --prompt.
(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.
2004-02-19 16:26:32 +00:00
Werner Koch
de43297298 * sc-investigate.c (main): Setup the used character set.
* scdaemon.c (main): Ditto.

* scdaemon.c (set_debug): New.  Add option --debug-level.
(main): Add option --gpgconf-list.
2004-02-18 17:00:11 +00:00
Werner Koch
82b26c5965 Include cmacros.am for common flags. 2004-02-12 09:29:14 +00:00
Werner Koch
94c03c860e (reset_notify): Release the application context and
close the reader.
2004-01-29 20:17:51 +00:00
Werner Koch
97958029f6 (iso7816_manage_security_env): New.
(iso7816_decipher): Add PADIND argument.

** app-nks.c is now functional **
2004-01-28 16:21:57 +00:00
Werner Koch
eb24d8b751 Some minor bug fixes, new test utilities and started support for other
smartcard applications.
2004-01-27 16:40:42 +00:00
Werner Koch
28db0fabb4 * apdu.c (apdu_send_le): Send a get_response with the indicated
length and not the 64 bytes we used for testing.
* app-openpgp.c (verify_chv2, verify_chv3, do_sign): Check the
minimum length of the passphrase, so that we don't need to
decrement the retry counter.
2003-12-23 10:25:24 +00:00
Werner Koch
c4182e3e24 Replaced deprecated type names.
* card-p15.c (p15_enum_keypairs): Replaced KRC by RC.
* card-dinsig.c (dinsig_enum_keypairs): Ditto.
2003-12-17 12:27:51 +00:00
Werner Koch
f438224dae (main): Set the prefixes for assuan logging. 2003-12-16 16:30:55 +00:00
Werner Koch
7134af9fdb * scdaemon.c, scdaemon.h: New options --allow-admin and --deny-admin.
* app-openpgp.c (verify_chv3): Check it here.
2003-12-01 10:54:09 +00:00
Werner Koch
dba40e5e45 Mainly changes to adjust for the changed KSBA API. 2003-11-12 15:17:44 +00:00
Werner Koch
c8fb3836fb * apdu.c (close_ct_reader, close_pcsc_reader): Implemented.
(get_ccid_error_string): New.  Not very useful messages, though.
2003-10-31 12:12:36 +00:00
Werner Koch
5ee820978d * command.c (cmd_genkey, cmd_passwd): Fixed faulty use of
!spacep().

* apdu.c (apdu_open_reader): Hacks for PC/SC under Windows.
2003-10-25 14:22:42 +00:00
Werner Koch
21be16dba9 * command.c (cmd_checkpin): New.
(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.
2003-10-21 17:12:50 +00:00
Werner Koch
1bc1427e72 * ccid-driver.c (ccid_transceive): Add T=1 chaining for sending. 2003-10-09 15:18:08 +00:00
Werner Koch
30342b06ef * call-agent.c (agent_scd_getattr): Don't clear the passed info
structure, so that it can indeed be updated.

* card-util.c (fpr_is_zero): New.
(generate_card_keys): New.
(card_edit): New command "generate".
* keygen.c (generate_keypair): New arg CARD_SERIALNO, removed call
to check_smartcard.
(check_smartcard,show_smartcard): Removed.
(show_sha1_fpr,fpr_is_zero): Removed.

* app-openpgp.c (do_getattr): Support SERIALNO and AID.
2003-10-08 10:46:58 +00:00
Werner Koch
f194ebc782 Fixes to make inclusion of card raleted source files into 1.3 easier. 2003-10-02 10:27:34 +00:00
Werner Koch
59a61b3c93 * command.c (cmd_getattr): New command GETATTR.
* 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.
2003-09-30 17:35:05 +00:00
Werner Koch
3af881581f Minor fixes 2003-09-30 13:22:33 +00:00
Werner Koch
43c5c29bc1 (parse_ccid_descriptor): New.
(read_device_info): New.
(ccid_open_reader): Check that the device has all required features.
2003-09-19 11:17:11 +00:00
Werner Koch
be034cf34c * configure.ac: Required newer versions of some libraries.
* 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-06 13:23:48 +00:00
Werner Koch
25430119e8 * ccid-driver.c: More work, data can now actually be retrieved.
* ccid-driver.c, ccid-driver.h: Alternativley allow use under BSD
conditions.
2003-09-05 07:40:41 +00:00
Werner Koch
936250aac9 * configure.ac (HAVE_LIBUSB): Added a simple test for libusb.
* 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-09-02 19:06:34 +00:00
Timo Schulz
93c76df907 2003-08-26 Timo Schulz <twoaday@freakmail.de>
* apdu.c (new_reader_slot): Only set 'is_osc' when OpenSC
        is used.
2003-08-26 09:01:18 +00:00
Werner Koch
ab0f32351d (cmd_setattr): Use a copy of LINE.
(cmd_genkey): Use a copy of KEYNO.
(cmd_passwd): Use a copy of CHVNOSTR.
(cmd_pksign, cmd_pkauth, cmd_pkdecrypt): s/strdup/xtrystrdup/.
2003-08-25 09:58:02 +00:00
Werner Koch
e3cdba8386 * scdaemon.c, scdaemon.h: New option --pcsc-driver.
* apdu.c (apdu_open_reader): Use that option here instead of a
hardcoded one.
2003-08-19 09:36:48 +00:00
Werner Koch
4eb5165019 * 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.

* card-p15.c (p15_enum_keypairs, p15_prepare_key): Adjusted for
libgpg-error.
2003-08-18 17:34:51 +00:00
Werner Koch
0506e4ebec * Makefile.am: Add OPENSC_LIBS to all programs.
* 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-18 17:34:28 +00:00
Timo Schulz
abbb66e037 * Always use 'dynload.h' instead of 'dlfcn.h'. 2003-08-14 12:20:08 +00:00
Werner Koch
1bcf8ef9de Cleanups, fixes and PC/SC support 2003-08-05 17:11:04 +00:00
Repo Admin
9ca4830a5b This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2003-08-05 17:11:04 +00:00
Repo Admin
7250331472 This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2003-06-05 07:14:21 +00:00
Repo Admin
82a17c9fb3 This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2002-10-19 07:55:27 +00:00