}\r
}\r
\r
- //\r
- // The User's password doesn't match the input password.\r
- // Return the user ID whose password matches the input password.\r
- //\r
- CopyMem (\r
- Identifier,\r
- &mPwdTable->UserInfo[mPwdTable->ValidIndex - 1].UserId,\r
- sizeof (EFI_USER_INFO_IDENTIFIER)\r
- );\r
FreePool (UserInfo); \r
- return EFI_SUCCESS;\r
+ return EFI_NOT_READY;\r
}\r
\r
\r
/** @file\r
Usb Credential Provider driver implemenetation.\r
\r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
} \r
}\r
}\r
- FreePool (UserInfo);\r
- \r
- //\r
- // The read token mismatch with the User's Token.\r
- // Only check token.\r
- //\r
- for (Index = 0; Index < mUsbTable->Count; Index++) {\r
- UserToken = mUsbTable->UserInfo[Index].Token;\r
- if (CompareMem (UserToken, ReadToken, HASHED_CREDENTIAL_LEN) == 0) {\r
- //\r
- // The read token matches with the one in UsbTable.\r
- //\r
- UserId = (UINT8 *) &mUsbTable->UserInfo[Index].UserId;\r
- CopyMem (Identifier, UserId, sizeof (EFI_USER_INFO_IDENTIFIER));\r
- return EFI_SUCCESS;\r
- } \r
- }\r
- \r
- return EFI_NOT_FOUND;\r
+\r
+ FreePool (UserInfo); \r
+ \r
+ return EFI_NOT_READY;\r
}\r
\r
\r
Identify the User by the specfied provider.\r
\r
@param[in] User Handle of a user profile.\r
- @param[in] Provider Points to the identifir of credential provider.\r
+ @param[in] Provider Points to the identifier of credential provider.\r
\r
@retval EFI_INVALID_PARAMETER Provider is NULL.\r
@retval EFI_NOT_FOUND Fail to identify the specified user.\r
EFI_GUID FormSetId;\r
EFI_FORM_ID FormId;\r
EFI_USER_CREDENTIAL_PROTOCOL *UserCredential;\r
- EFI_USER_INFO *IdInfo;\r
\r
if (Provider == NULL) {\r
return EFI_INVALID_PARAMETER;\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
-\r
- if (User == NULL) {\r
- return EFI_SUCCESS;\r
- }\r
\r
- //\r
- // Get user ID information.\r
- //\r
- IdInfo = NULL;\r
- Status = FindUserInfoByType (User, &IdInfo, EFI_USER_INFO_IDENTIFIER_RECORD);\r
- ASSERT (IdInfo != NULL);\r
-\r
- if (CompareMem ((UINT8 *) (IdInfo + 1), UserId, sizeof (EFI_USER_INFO_IDENTIFIER)) != 0) {\r
- //\r
- // One user name is selected, but the other's credential is given. Here no user passed.\r
- //\r
- break;\r
- }\r
return EFI_SUCCESS;\r
}\r
}\r