aboutsummaryrefslogtreecommitdiff
path: root/init_dir.go
diff options
context:
space:
mode:
authorinvis-z2023-11-21 18:12:01 +0000
committerrfjakob2024-04-19 22:36:55 +0200
commit4b6b9553c4a2e14fd809754f6bf187957ff3cdfd (patch)
treec020acb7b2ebfb6121725082ec03944c8a6aa1cd /init_dir.go
parentf5007b28c366d1a9671146710975679a154f30f8 (diff)
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
Diffstat (limited to 'init_dir.go')
-rw-r--r--init_dir.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/init_dir.go b/init_dir.go
index 738590f..9ba1a01 100644
--- a/init_dir.go
+++ b/init_dir.go
@@ -84,7 +84,7 @@ func initDir(args *argContainer) {
if args.fido2 != "" {
fido2CredentialID = fido2.Register(args.fido2, filepath.Base(args.cipherdir))
fido2HmacSalt = cryptocore.RandBytes(32)
- password = fido2.Secret(args.fido2, fido2CredentialID, fido2HmacSalt)
+ password = fido2.Secret(args.fido2, args.fido2_assert_options, fido2CredentialID, fido2HmacSalt)
} else {
// normal password entry
password, err = readpassword.Twice([]string(args.extpass), []string(args.passfile))
@@ -105,6 +105,7 @@ func initDir(args *argContainer) {
AESSIV: args.aessiv,
Fido2CredentialID: fido2CredentialID,
Fido2HmacSalt: fido2HmacSalt,
+ Fido2AssertOptions: args.fido2_assert_options,
DeterministicNames: args.deterministic_names,
XChaCha20Poly1305: args.xchacha,
LongNameMax: args.longnamemax,