|
|
|
@ -55,6 +55,8 @@ type ConfFile struct {
|
|
|
|
|
FeatureFlags []string
|
|
|
|
|
// FIDO2 parameters
|
|
|
|
|
FIDO2 *FIDO2Params `json:",omitempty"`
|
|
|
|
|
// LongNameMax corresponds to the -longnamemax flag
|
|
|
|
|
LongNameMax uint8 `json:",omitempty"`
|
|
|
|
|
// Filename is the name of the config file. Not exported to JSON.
|
|
|
|
|
filename string
|
|
|
|
|
}
|
|
|
|
@ -71,6 +73,7 @@ type CreateArgs struct {
|
|
|
|
|
Fido2HmacSalt []byte
|
|
|
|
|
DeterministicNames bool
|
|
|
|
|
XChaCha20Poly1305 bool
|
|
|
|
|
LongNameMax uint8
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Create - create a new config with a random key encrypted with
|
|
|
|
@ -97,6 +100,12 @@ func Create(args *CreateArgs) error {
|
|
|
|
|
if !args.DeterministicNames {
|
|
|
|
|
cf.setFeatureFlag(FlagDirIV)
|
|
|
|
|
}
|
|
|
|
|
// 0 means to *use* the default (which means we don't have to save it), and
|
|
|
|
|
// 255 *is* the default, which means we don't have to save it either.
|
|
|
|
|
if args.LongNameMax != 0 && args.LongNameMax != 255 {
|
|
|
|
|
cf.LongNameMax = args.LongNameMax
|
|
|
|
|
cf.setFeatureFlag(FlagLongNameMax)
|
|
|
|
|
}
|
|
|
|
|
cf.setFeatureFlag(FlagEMENames)
|
|
|
|
|
cf.setFeatureFlag(FlagLongNames)
|
|
|
|
|
cf.setFeatureFlag(FlagRaw64)
|
|
|
|
|