YKCS11: Change DBG to print to stderr.

This commit is contained in:
Alessio Di Mauro
2015-11-05 15:26:59 +01:00
parent 98f3462e5e
commit 602208bf20
7 changed files with 318 additions and 318 deletions
+3 -3
View File
@@ -15,18 +15,18 @@ static CK_RV COMMON_token_login(ykpiv_state *state, CK_USER_TYPE user, CK_UTF8CH
if (user == CKU_USER) {
if (ykpiv_verify(state, (char *)pin, &tries) != YKPIV_OK) {
DBG(("Failed to login"));
DBG("Failed to login");
return CKR_PIN_INCORRECT;
}
}
else if (user == CKU_SO) {
if(ykpiv_hex_decode((char *)pin, pin_len, key, &key_len) != YKPIV_OK) {
DBG(("Failed decoding key"));
DBG("Failed decoding key");
return CKR_FUNCTION_FAILED;
}
if(ykpiv_authenticate(state, key) != YKPIV_OK) {
DBG(("Failed to authenticate"));
DBG("Failed to authenticate");
return CKR_PIN_INCORRECT;
}
}