Skip to content

Commit

Permalink
checking for pin length == 0 is not needed
Browse files Browse the repository at this point in the history
this is now covered by the core library
OpenSC/OpenSC@868f76f
  • Loading branch information
frankmorgner committed Dec 13, 2023
1 parent 678e3e7 commit f860cab
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions OpenSCToken/TokenSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ static BOOL OpenSCAuthOperationFinishWithError(OpenSCTokenSession *session, NSDa
pin = [PIN UTF8String];
pin_len = strlen(pin);
}
if (0 == pin_len) {
/* with pin_len==0, sc_pkcs15_verify_pin() would check if the PIN is already authenticated with sc_pkcs15_get_pin_info(). Since we want to enforce a PIN validation, we don't accept this. */
r = SC_ERROR_INVALID_PIN_LENGTH;
goto err;
}

/*
* Do what PKCS#11 would do for keys requiring CKA_ALWAYS_AUTHENTICATE
Expand Down

0 comments on commit f860cab

Please sign in to comment.