diff options
Diffstat (limited to 'scard.c')
-rw-r--r-- | scard.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -24,7 +24,8 @@ | |||
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | #ifdef SMARTCARD | 26 | #ifdef SMARTCARD |
27 | RCSID("$OpenBSD: scard.c,v 1.20 2002/03/21 16:57:15 markus Exp $"); | 27 | RCSID("$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); |