summaryrefslogtreecommitdiffstats
path: root/scd/card.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-08-18 19:34:51 +0200
committerWerner Koch <wk@gnupg.org>2003-08-18 19:34:51 +0200
commit4eb5165019c100435b139825edae8a4c03d89e21 (patch)
tree4f64a680d82d0f8bdb486d255e8f216f12932d3d /scd/card.c
parent* Makefile.am: Add OPENSC_LIBS to all programs. (diff)
downloadgnupg2-4eb5165019c100435b139825edae8a4c03d89e21.tar.xz
gnupg2-4eb5165019c100435b139825edae8a4c03d89e21.zip
* 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.
Diffstat (limited to 'scd/card.c')
-rw-r--r--scd/card.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/scd/card.c b/scd/card.c
index 02b7bfdbf..0a71fb2df 100644
--- a/scd/card.c
+++ b/scd/card.c
@@ -88,7 +88,7 @@ card_help_get_keygrip (KsbaCert cert, unsigned char *array)
/* Create a new context for the card and figures out some basic
- information of the card. Detects whgether a PKCS_15 application is
+ information of the card. Detects whether a PKCS_15 application is
stored.
Common errors: GPG_ERR_CARD_NOT_PRESENT */
@@ -99,6 +99,9 @@ card_open (CARD *rcard)
CARD card;
int rc;
+ if (opt.disable_opensc)
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
card = xtrycalloc (1, sizeof *card);
if (!card)
return out_of_core ();