/* If Security2Handler is NULL, then ASSERT(). If no enough resources available to register new handler, then ASSERT(). If AuthenticationOperation is not recongnized, then ASSERT(). If AuthenticationOperation is EFI_AUTH_OPERATION_NONE, then ASSERT(). If the previous register handler can't be executed before the later register handler, then ASSERT(). */
EFI_STATUS EFIAPI RegisterSecurity2Handler(IN SECURITY2_FILE_AUTHENTICATION_HANDLER Security2Handler, IN UINT32 AuthenticationOperation)
/* If Security2Handler is NULL, then ASSERT(). If no enough resources available to register new handler, then ASSERT(). If AuthenticationOperation is not recongnized, then ASSERT(). If AuthenticationOperation is EFI_AUTH_OPERATION_NONE, then ASSERT(). If the previous register handler can't be executed before the later register handler, then ASSERT(). */
EFI_STATUS EFIAPI RegisterSecurity2Handler(IN SECURITY2_FILE_AUTHENTICATION_HANDLER Security2Handler, IN UINT32 AuthenticationOperation)
{
  EFI_STATUS  Status;
  ASSERT (Security2Handler != NULL);
  ASSERT (CheckAuthentication2Operation (mCurrentAuthOperation2, AuthenticationOperation));
  mCurrentAuthOperation2 = mCurrentAuthOperation2 | AuthenticationOperation;
  if (mNumberOfSecurity2Handler == mMaxNumberOfSecurity2Handler) {
    Status = ReallocateSecurity2HandlerTable ();
    ASSERT_EFI_ERROR (Status);
  }
  mSecurity2Table[mNumberOfSecurity2Handler].Security2Operation = AuthenticationOperation;
  mSecurity2Table[mNumberOfSecurity2Handler].Security2Handler   = Security2Handler;
  mNumberOfSecurity2Handler++;
  return EFI_SUCCESS;
}