minidriver: build dependence on opensc_a.lib and pkcs15init.lib
spelling of comments and debug messages
This commit is contained in:
parent
667949019a
commit
da894500c9
@ -7,7 +7,7 @@ OBJECTS = minidriver.obj
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(TARGET): $(OBJECTS) ..\libopensc\opensc_a.lib ..\pkcs15init\pkcs15init.lib
|
||||
echo LIBRARY $* > $*.def
|
||||
echo EXPORTS >> $*.def
|
||||
type minidriver.exports >> $*.def
|
||||
|
@ -169,7 +169,8 @@ static CK_RV pkcs15_create_slot(struct sc_pkcs11_card *p11card, struct pkcs15_fw
|
||||
struct sc_pkcs15_object *auth, struct sc_app_info *app,
|
||||
struct sc_pkcs11_slot **out);
|
||||
|
||||
/* Returns forst available WF data or WF data corresponding to the given application */
|
||||
/* Returns WF data corresponding to the given application or,
|
||||
* if application info is not supplied, returns first available WF data. */
|
||||
static struct pkcs15_fw_data *
|
||||
get_fw_data(struct sc_pkcs11_card *p11card, struct sc_app_info *app_info, int *out_idx)
|
||||
{
|
||||
|
@ -185,22 +185,23 @@ CK_RV card_detect(sc_reader_t *reader)
|
||||
|
||||
rv = CKR_OK;
|
||||
|
||||
sc_log(context, "%s: Detecting smart card\n", reader->name);
|
||||
/* Check if someone inserted a card */
|
||||
again:rc = sc_detect_card_presence(reader);
|
||||
sc_log(context, "%s: Detecting smart card", reader->name);
|
||||
/* Check if someone inserted a card */
|
||||
again:
|
||||
rc = sc_detect_card_presence(reader);
|
||||
if (rc < 0) {
|
||||
sc_log(context, "%s: failed, %s\n", reader->name, sc_strerror(rc));
|
||||
sc_log(context, "%s: failed, %s", reader->name, sc_strerror(rc));
|
||||
return sc_to_cryptoki_error(rc, NULL);
|
||||
}
|
||||
if (rc == 0) {
|
||||
sc_log(context, "%s: card absent\n", reader->name);
|
||||
sc_log(context, "%s: card absent", reader->name);
|
||||
card_removed(reader); /* Release all resources */
|
||||
return CKR_TOKEN_NOT_PRESENT;
|
||||
}
|
||||
|
||||
/* If the card was changed, disconnect the current one */
|
||||
if (rc & SC_READER_CARD_CHANGED) {
|
||||
sc_log(context, "%s: Card changed\n", reader->name);
|
||||
sc_log(context, "%s: Card changed", reader->name);
|
||||
/* The following should never happen - but if it
|
||||
* does we'll be stuck in an endless loop.
|
||||
* So better be fussy.
|
||||
|
Loading…
Reference in New Issue
Block a user