mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
Rename GroupQuorum to ShamirThreshold.
Signed-off-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -696,12 +696,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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user