Skip to content

Commit 4ddc18f

Browse files
committed
Update AuthenticatorAssertionResponse.cs
1 parent c83b0b1 commit 4ddc18f

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

Src/Fido2/AuthenticatorAssertionResponse.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public static AuthenticatorAssertionResponse Parse(AuthenticatorAssertionRawResp
5252
/// <param name="storedSignatureCounter">The stored counter value for this CredentialId</param>
5353
/// <param name="isUserHandleOwnerOfCredId">A function that returns <see langword="true"/> if user handle is owned by the credential ID.</param>
5454
/// <param name="metadataService"></param>
55+
/// <param name="requestTokenBindingId">DO NOT USE - Deprecated, but kept in code due to conformance testing tool</param>
5556
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
5657
public async Task<VerifyAssertionResult> VerifyAsync(
5758
AssertionOptions options,
@@ -121,7 +122,6 @@ public async Task<VerifyAssertionResult> VerifyAsync(
121122

122123
byte[] hashedRpId = SHA256.HashData(Encoding.UTF8.GetBytes(rpid ?? string.Empty));
123124
byte[] hash = SHA256.HashData(Raw.Response.ClientDataJson);
124-
bool conformanceTesting = metadataService != null && metadataService.ConformanceTesting();
125125

126126
if (!authData.RpIdHash.SequenceEqual(hashedRpId))
127127
throw new Fido2VerificationException(Fido2ErrorCode.InvalidRpidHash, Fido2ErrorMessages.InvalidRpidHash);
@@ -136,16 +136,7 @@ public async Task<VerifyAssertionResult> VerifyAsync(
136136
if (!authData.UserVerified)
137137
throw new Fido2VerificationException(Fido2ErrorCode.UserVerificationRequirementNotMet, Fido2ErrorMessages.UserVerificationRequirementNotMet);
138138
}
139-
// =====
140-
// // 14. Verify that the UP bit of the flags in authData is set.
141-
// if (!authData.UserPresent && (!conformanceTesting || options.UserVerification is UserVerificationRequirement.Required))
142-
// throw new Fido2VerificationException(Fido2ErrorCode.UserPresentFlagNotSet, Fido2ErrorMessages.UserPresentFlagNotSet);
143-
//
144-
// // 15. If the Relying Party requires user verification for this assertion, verify that the UV bit of the flags in authData is set.
145-
// if (options.UserVerification is UserVerificationRequirement.Required && !authData.UserVerified)
146-
// throw new Fido2VerificationException(Fido2ErrorCode.UserVerificationRequirementNotMet, Fido2ErrorMessages.UserVerificationRequirementNotMet);
147-
148-
139+
149140
// 16. If the credential backup state is used as part of Relying Party business logic or policy, let currentBe and currentBs be the values of the BE and BS bits, respectively, of the flags in authData.
150141
// Compare currentBe and currentBs with credentialRecord.BE and credentialRecord.BS and apply Relying Party policy, if any.
151142
if (authData.IsBackupEligible && config.BackupEligibleCredentialPolicy is Fido2Configuration.CredentialBackupPolicy.Disallowed ||

0 commit comments

Comments
 (0)