summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--scard.c8
2 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index af8cfb640..eed8676ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,7 +127,9 @@
127 - markus@cvs.openbsd.org 2002/03/21 16:58:13 127 - markus@cvs.openbsd.org 2002/03/21 16:58:13
128 [clientloop.c] 128 [clientloop.c]
129 remove unused 129 remove unused
130 130 - rees@cvs.openbsd.org 2002/03/21 18:08:15
131 [scard.c]
132 In sc_put_key(), sc_reader_id should be id.
13120020317 13320020317
132 - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted, 134 - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted,
133 warn if directory does not exist. Put system directories in front of 135 warn if directory does not exist. Put system directories in front of
@@ -7973,4 +7975,4 @@
7973 - Wrote replacements for strlcpy and mkdtemp 7975 - Wrote replacements for strlcpy and mkdtemp
7974 - Released 1.0pre1 7976 - Released 1.0pre1
7975 7977
7976$Id: ChangeLog,v 1.1960 2002/03/22 03:35:48 mouring Exp $ 7978$Id: ChangeLog,v 1.1961 2002/03/22 03:38:35 mouring Exp $
diff --git a/scard.c b/scard.c
index 7bd72d8ec..9d044acb9 100644
--- a/scard.c
+++ b/scard.c
@@ -24,7 +24,8 @@
24 24
25#include "includes.h" 25#include "includes.h"
26#ifdef SMARTCARD 26#ifdef SMARTCARD
27RCSID("$OpenBSD: scard.c,v 1.20 2002/03/21 16:57:15 markus Exp $"); 27RCSID("$OpenBSD: scard.c,v 1.21 2002/03/21 18:08:15 rees Exp $");
28
28#include <openssl/engine.h> 29#include <openssl/engine.h>
29#include <openssl/evp.h> 30#include <openssl/evp.h>
30#include <sectok.h> 31#include <sectok.h>
@@ -413,14 +414,13 @@ sc_put_key(Key *prv, const char *id)
413 COPY_RSA_KEY(dmp1, 4); 414 COPY_RSA_KEY(dmp1, 4);
414 COPY_RSA_KEY(n, 5); 415 COPY_RSA_KEY(n, 5);
415 len = BN_num_bytes(prv->rsa->n); 416 len = BN_num_bytes(prv->rsa->n);
416 fd = sectok_friendly_open(sc_reader_id, STONOWAIT, &sw); 417 fd = sectok_friendly_open(id, STONOWAIT, &sw);
417 if (fd < 0) { 418 if (fd < 0) {
418 error("sectok_open failed: %s", sectok_get_sw(sw)); 419 error("sectok_open failed: %s", sectok_get_sw(sw));
419 goto done; 420 goto done;
420 } 421 }
421 if (! sectok_cardpresent(fd)) { 422 if (! sectok_cardpresent(fd)) {
422 error("smartcard in reader %s not present", 423 error("smartcard in reader %s not present", id);
423 sc_reader_id);
424 goto done; 424 goto done;
425 } 425 }
426 ret = sectok_reset(fd, 0, NULL, &sw); 426 ret = sectok_reset(fd, 0, NULL, &sw);