From e481717e44bfb7c36b9f1eea0dce47abbf6542ed Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 25 Sep 2024 22:36:56 +0300 Subject: [PATCH] Rename GroupQuorum to ShamirThreshold. Signed-off-by: Felix Fontein --- cmd/sops/main.go | 12 ++++++------ cmd/sops/subcommand/updatekeys/updatekeys.go | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/sops/main.go b/cmd/sops/main.go index 5b1050e45..503968fd9 100644 --- a/cmd/sops/main.go +++ b/cmd/sops/main.go @@ -643,12 +643,12 @@ func main() { failedCounter := 0 for _, path := range c.Args() { err := updatekeys.UpdateKeys(updatekeys.Opts{ - InputPath: path, - GroupQuorum: c.Int("shamir-secret-sharing-threshold"), - KeyServices: keyservices(c), - Interactive: !c.Bool("yes"), - ConfigPath: configPath, - InputType: c.String("input-type"), + InputPath: path, + ShamirThreshold: c.Int("shamir-secret-sharing-threshold"), + KeyServices: keyservices(c), + Interactive: !c.Bool("yes"), + ConfigPath: configPath, + InputType: c.String("input-type"), }) if c.NArg() == 1 { diff --git a/cmd/sops/subcommand/updatekeys/updatekeys.go b/cmd/sops/subcommand/updatekeys/updatekeys.go index cb9ca7c36..580adf7be 100644 --- a/cmd/sops/subcommand/updatekeys/updatekeys.go +++ b/cmd/sops/subcommand/updatekeys/updatekeys.go @@ -15,7 +15,7 @@ import ( // Opts represents key operation options and config type Opts struct { InputPath string - GroupQuorum int + ShamirThreshold int KeyServices []keyservice.KeyServiceClient DecryptionOrder []string Interactive bool @@ -70,8 +70,8 @@ func updateFile(opts Opts) error { // TODO: use conf.ShamirThreshold instead of tree.Metadata.ShamirThreshold in the next line? // Or make this configurable? var shamirThreshold = tree.Metadata.ShamirThreshold - if opts.GroupQuorum != 0 { - shamirThreshold = opts.GroupQuorum + if opts.ShamirThreshold != 0 { + shamirThreshold = opts.ShamirThreshold } shamirThreshold = min(shamirThreshold, len(conf.KeyGroups)) var shamirThresholdWillChange = tree.Metadata.ShamirThreshold != shamirThreshold