From 4b6b9553c4a2e14fd809754f6bf187957ff3cdfd Mon Sep 17 00:00:00 2001 From: invis-z Date: Tue, 21 Nov 2023 18:12:01 +0000 Subject: Add option to set FIDO2 verificatoin option Add an option to specify user verification options for `fido2-assert -t` Options will be saved to config file Provide same functionality to #705 with simpler implementation Resolve #702 --- internal/configfile/config_file.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'internal/configfile/config_file.go') diff --git a/internal/configfile/config_file.go b/internal/configfile/config_file.go index 3d59dc5..995a0c8 100644 --- a/internal/configfile/config_file.go +++ b/internal/configfile/config_file.go @@ -33,6 +33,7 @@ type FIDO2Params struct { CredentialID []byte // FIDO2 hmac-secret salt HMACSalt []byte + AssertOptions []string } // ConfFile is the content of a config file. @@ -71,6 +72,7 @@ type CreateArgs struct { AESSIV bool Fido2CredentialID []byte Fido2HmacSalt []byte + Fido2AssertOptions []string DeterministicNames bool XChaCha20Poly1305 bool LongNameMax uint8 @@ -117,8 +119,9 @@ func Create(args *CreateArgs) error { if len(args.Fido2CredentialID) > 0 { cf.setFeatureFlag(FlagFIDO2) cf.FIDO2 = &FIDO2Params{ - CredentialID: args.Fido2CredentialID, - HMACSalt: args.Fido2HmacSalt, + CredentialID: args.Fido2CredentialID, + HMACSalt: args.Fido2HmacSalt, + AssertOptions: args.Fido2AssertOptions, } } // Catch bugs and invalid cli flag combinations early -- cgit v1.2.3