Skip to content

Commit

Permalink
Make main.go compile again with SOPS 3.9.0.
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fontein <[email protected]>
  • Loading branch information
felixfontein committed Dec 25, 2024
1 parent 7a2a840 commit c6a8989
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import (
"regexp"
"time"

"github.com/getsops/sops/v3"
"github.com/getsops/sops/v3/aes"
"github.com/getsops/sops/v3/cmd/sops/common"
"github.com/getsops/sops/v3/cmd/sops/formats"
"github.com/getsops/sops/v3/config"
"github.com/getsops/sops/v3/keyservice"
"github.com/xlzd/gotp"
"google.golang.org/grpc"
Expand Down Expand Up @@ -75,14 +77,14 @@ func decryptConfig(path string) (cfg Config, err error) {
svcs = append(svcs, keyservice.NewKeyServiceClient(conn))
}

store := common.StoreForFormat(formats.Yaml)
store := common.StoreForFormat(formats.Yaml, &config.StoresConfig{})

// Load SOPS file and access the data key
tree, err := store.LoadEncryptedFile(encryptedData)
if err != nil {
return cfg, err
}
key, err := tree.Metadata.GetDataKeyWithKeyServices(svcs)
key, err := tree.Metadata.GetDataKeyWithKeyServices(svcs, sops.DefaultDecryptionOrder)
if err != nil {
return cfg, err
}
Expand Down

0 comments on commit c6a8989

Please sign in to comment.