Skip to content

Commit e481717

Browse files
committed
Rename GroupQuorum to ShamirThreshold.
Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent 349ad29 commit e481717

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

cmd/sops/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -643,12 +643,12 @@ func main() {
643643
failedCounter := 0
644644
for _, path := range c.Args() {
645645
err := updatekeys.UpdateKeys(updatekeys.Opts{
646-
InputPath: path,
647-
GroupQuorum: c.Int("shamir-secret-sharing-threshold"),
648-
KeyServices: keyservices(c),
649-
Interactive: !c.Bool("yes"),
650-
ConfigPath: configPath,
651-
InputType: c.String("input-type"),
646+
InputPath: path,
647+
ShamirThreshold: c.Int("shamir-secret-sharing-threshold"),
648+
KeyServices: keyservices(c),
649+
Interactive: !c.Bool("yes"),
650+
ConfigPath: configPath,
651+
InputType: c.String("input-type"),
652652
})
653653

654654
if c.NArg() == 1 {

cmd/sops/subcommand/updatekeys/updatekeys.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
// Opts represents key operation options and config
1616
type Opts struct {
1717
InputPath string
18-
GroupQuorum int
18+
ShamirThreshold int
1919
KeyServices []keyservice.KeyServiceClient
2020
DecryptionOrder []string
2121
Interactive bool
@@ -70,8 +70,8 @@ func updateFile(opts Opts) error {
7070
// TODO: use conf.ShamirThreshold instead of tree.Metadata.ShamirThreshold in the next line?
7171
// Or make this configurable?
7272
var shamirThreshold = tree.Metadata.ShamirThreshold
73-
if opts.GroupQuorum != 0 {
74-
shamirThreshold = opts.GroupQuorum
73+
if opts.ShamirThreshold != 0 {
74+
shamirThreshold = opts.ShamirThreshold
7575
}
7676
shamirThreshold = min(shamirThreshold, len(conf.KeyGroups))
7777
var shamirThresholdWillChange = tree.Metadata.ShamirThreshold != shamirThreshold

0 commit comments

Comments
 (0)