diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | scard.c | 12 |
2 files changed, 13 insertions, 4 deletions
@@ -72,6 +72,9 @@ | |||
72 | >I am not sure which version of my old code you are using but I am | 72 | >I am not sure which version of my old code you are using but I am |
73 | >happy for the notice above to be substituted for my existing copyright | 73 | >happy for the notice above to be substituted for my existing copyright |
74 | >intent if this meets your purpose. | 74 | >intent if this meets your purpose. |
75 | - jakob@cvs.openbsd.org 2001/07/31 08:41:10 | ||
76 | [scard.c] | ||
77 | do not complain about missing smartcards. ok markus@ | ||
75 | 78 | ||
76 | 20010803 | 79 | 20010803 |
77 | - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on | 80 | - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on |
@@ -6182,4 +6185,4 @@ | |||
6182 | - Wrote replacements for strlcpy and mkdtemp | 6185 | - Wrote replacements for strlcpy and mkdtemp |
6183 | - Released 1.0pre1 | 6186 | - Released 1.0pre1 |
6184 | 6187 | ||
6185 | $Id: ChangeLog,v 1.1444 2001/08/06 21:24:11 mouring Exp $ | 6188 | $Id: ChangeLog,v 1.1445 2001/08/06 21:25:38 mouring Exp $ |
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #ifdef SMARTCARD | 25 | #ifdef SMARTCARD |
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | RCSID("$OpenBSD: scard.c,v 1.8 2001/07/30 16:06:07 jakob Exp $"); | 27 | RCSID("$OpenBSD: scard.c,v 1.9 2001/07/31 08:41:10 jakob Exp $"); |
28 | 28 | ||
29 | #include <openssl/engine.h> | 29 | #include <openssl/engine.h> |
30 | #include <sectok.h> | 30 | #include <sectok.h> |
@@ -62,7 +62,7 @@ sc_open(void) | |||
62 | return SCARD_ERROR_FAIL; | 62 | return SCARD_ERROR_FAIL; |
63 | } | 63 | } |
64 | if (! sectok_cardpresent(sc_fd)) { | 64 | if (! sectok_cardpresent(sc_fd)) { |
65 | error("smartcard in reader %d not present, skipping", | 65 | debug("smartcard in reader %d not present, skipping", |
66 | sc_reader_num); | 66 | sc_reader_num); |
67 | return SCARD_ERROR_NOCARD; | 67 | return SCARD_ERROR_NOCARD; |
68 | } | 68 | } |
@@ -328,13 +328,19 @@ Key * | |||
328 | sc_get_key(int num) | 328 | sc_get_key(int num) |
329 | { | 329 | { |
330 | Key *k; | 330 | Key *k; |
331 | int status; | ||
331 | 332 | ||
332 | sc_reader_num = num; | 333 | sc_reader_num = num; |
333 | k = key_new(KEY_RSA); | 334 | k = key_new(KEY_RSA); |
334 | if (k == NULL) { | 335 | if (k == NULL) { |
335 | return NULL; | 336 | return NULL; |
336 | } | 337 | } |
337 | if (sc_read_pubkey(k) < 0) { | 338 | status = sc_read_pubkey(k); |
339 | if (status == SCARD_ERROR_NOCARD) { | ||
340 | key_free(k); | ||
341 | return NULL; | ||
342 | } | ||
343 | if (status < 0 ) { | ||
338 | error("sc_read_pubkey failed"); | 344 | error("sc_read_pubkey failed"); |
339 | key_free(k); | 345 | key_free(k); |
340 | return NULL; | 346 | return NULL; |