- jakob@cvs.openbsd.org 2001/07/31 12:53:34
[scard.c] close smartcard connection if card is missing
This commit is contained in:
parent
95148e3de2
commit
3ab1dfa2a6
|
@ -84,6 +84,9 @@
|
||||||
[sftp-int.c sftp-server.c]
|
[sftp-int.c sftp-server.c]
|
||||||
avoid paths beginning with "//"; <vinschen@redhat.com>
|
avoid paths beginning with "//"; <vinschen@redhat.com>
|
||||||
ok markus@
|
ok markus@
|
||||||
|
- jakob@cvs.openbsd.org 2001/07/31 12:53:34
|
||||||
|
[scard.c]
|
||||||
|
close smartcard connection if card is missing
|
||||||
|
|
||||||
20010803
|
20010803
|
||||||
- (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on
|
- (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on
|
||||||
|
@ -6194,4 +6197,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1447 2001/08/06 21:30:53 mouring Exp $
|
$Id: ChangeLog,v 1.1448 2001/08/06 21:33:44 mouring Exp $
|
||||||
|
|
3
scard.c
3
scard.c
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#ifdef SMARTCARD
|
#ifdef SMARTCARD
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: scard.c,v 1.9 2001/07/31 08:41:10 jakob Exp $");
|
RCSID("$OpenBSD: scard.c,v 1.10 2001/07/31 12:53:34 jakob Exp $");
|
||||||
|
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
#include <sectok.h>
|
#include <sectok.h>
|
||||||
|
@ -64,6 +64,7 @@ sc_open(void)
|
||||||
if (! sectok_cardpresent(sc_fd)) {
|
if (! sectok_cardpresent(sc_fd)) {
|
||||||
debug("smartcard in reader %d not present, skipping",
|
debug("smartcard in reader %d not present, skipping",
|
||||||
sc_reader_num);
|
sc_reader_num);
|
||||||
|
sc_close();
|
||||||
return SCARD_ERROR_NOCARD;
|
return SCARD_ERROR_NOCARD;
|
||||||
}
|
}
|
||||||
if (sectok_reset(sc_fd, 0, NULL, &sw) <= 0) {
|
if (sectok_reset(sc_fd, 0, NULL, &sw) <= 0) {
|
||||||
|
|
Loading…
Reference in New Issue