From 661cc5f2e23b1ccd0f85deefca18c777a5780774 Mon Sep 17 00:00:00 2001 From: Vectorized Date: Wed, 6 Nov 2024 13:37:41 +0000 Subject: [PATCH] T --- src/utils/WebAuthn.sol | 16 +--------------- src/utils/g/WebAuthn.sol | 17 +---------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/utils/WebAuthn.sol b/src/utils/WebAuthn.sol index b704171e5..7e314a73b 100644 --- a/src/utils/WebAuthn.sol +++ b/src/utils/WebAuthn.sol @@ -31,20 +31,6 @@ library WebAuthn { bytes32 s; } - /// @dev Alternative struct for verification (Ithaca style). - struct WebAuthnMetadata { - // The WebAuthn authenticator data. - bytes authenticatorData; - // The WebAuthn client data JSON. - string clientDataJSON; - // Start index of "challenge":"..." in `clientDataJSON`. - uint256 challengeIndex; - // Start index of "type":"..." in `clientDataJSON`. - uint256 typeIndex; - // Whether to check that the "User Verified" flag in `authenticatorData` is set. - bool requireUserVerification; - } - /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ @@ -180,7 +166,7 @@ library WebAuthn { if (result) result = P256.verifySignature(h, r, s, x, y); } - /// @dev Alternative syntax for verification (Ithaca style). + /// @dev Returns if the `auth` is valid. function verify( bytes memory challenge, bool requireUserVerification, diff --git a/src/utils/g/WebAuthn.sol b/src/utils/g/WebAuthn.sol index 92bef4ebb..f0fa56813 100644 --- a/src/utils/g/WebAuthn.sol +++ b/src/utils/g/WebAuthn.sol @@ -25,22 +25,7 @@ struct WebAuthnAuth { bytes32 s; } -/// @dev Alternative struct for verification (Ithaca style). -struct WebAuthnMetadata { - // The WebAuthn authenticator data. - bytes authenticatorData; - // The WebAuthn client data JSON. - string clientDataJSON; - // Start index of "challenge":"..." in `clientDataJSON`. - uint256 challengeIndex; - // Start index of "type":"..." in `clientDataJSON`. - uint256 typeIndex; - // Whether to check that the "User Verified" flag in `authenticatorData` is set. - bool requireUserVerification; -} - using WebAuthn for WebAuthnAuth global; -using WebAuthn for WebAuthnMetadata global; import {Base64} from "../Base64.sol"; import {P256} from "../P256.sol"; @@ -185,7 +170,7 @@ library WebAuthn { if (result) result = P256.verifySignature(h, r, s, x, y); } - /// @dev Alternative syntax for verification (Ithaca style). + /// @dev Returns if the `auth` is valid. function verify( bytes memory challenge, bool requireUserVerification,