-
-
Notifications
You must be signed in to change notification settings - Fork 185
FIDO Conformance Tools v1.7.15 fixes #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
944f168
FIDO Conformance Tools v1.7.15 fixes
b700a2f
Json serialization fix
2b2382b
Unit test fix
13d2a3c
tokenbindig, AppId, UVP
googyi 3432820
unit test fix (tokenbinding dto parsing)
googyi 3113ee8
Merge branch 'master' into conformance-test-fixes
googyi c55c799
fix azure pipeline
googyi 7534243
Improve trustanchor test coverage
googyi 40a68e7
Merge branch 'master' into conformance-test-fixes
googyi cfaa1f9
TestPackedttestationAsyncFailTrustAnchorOnRootCertInTrustPath only wo…
googyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Fido2NetLib | ||
{ | ||
public class TokenBindingDto | ||
{ | ||
/// <summary> | ||
/// Either "present" or "supported". https://www.w3.org/TR/webauthn/#enumdef-tokenbindingstatus | ||
/// supported: Indicates the client supports token binding, but it was not negotiated when communicating with the Relying Party. | ||
/// present: Indicates token binding was used when communicating with the Relying Party. In this case, the id member MUST be present | ||
/// </summary> | ||
[JsonPropertyName("status")] | ||
public string? Status { get; set; } | ||
|
||
/// <summary> | ||
/// This member MUST be present if status is present, and MUST a base64url encoding of the Token Binding ID that was used when communicating with the Relying Party. | ||
/// </summary> | ||
[JsonPropertyName("id")] | ||
public string? Id { get; set; } | ||
|
||
public void Verify(byte[]? requestTokenbinding) | ||
{ | ||
// validation by the FIDO conformance tool (more than spec says) | ||
switch (Status) | ||
{ | ||
case "present": | ||
if (string.IsNullOrEmpty(Id)) | ||
throw new Fido2VerificationException("TokenBinding status was present but Id is missing"); | ||
var b64 = Base64Url.Encode(requestTokenbinding); | ||
if (Id != b64) | ||
throw new Fido2VerificationException("Tokenbinding Id does not match"); | ||
break; | ||
case "supported": | ||
case "not-supported": | ||
break; | ||
default: | ||
throw new Fido2VerificationException("Malformed tokenbinding status field"); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.