From f860cabca2d99bd600eb2affb2a8ef0a2a9b4bc0 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Wed, 13 Dec 2023 09:39:08 +0100 Subject: [PATCH] checking for pin length == 0 is not needed this is now covered by the core library https://github.com/OpenSC/OpenSC/commit/868f76fb31255fd3fdacfc3e476452efeb61c3e7 --- OpenSCToken/TokenSession.m | 5 ----- 1 file changed, 5 deletions(-) diff --git a/OpenSCToken/TokenSession.m b/OpenSCToken/TokenSession.m index 033e948..d6812f8 100644 --- a/OpenSCToken/TokenSession.m +++ b/OpenSCToken/TokenSession.m @@ -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