Skip to content

Commit b09f60e

Browse files
committed
Fix caching of Metadata.DataKey.
At the end of the function, the key was stored in m.DataKey. Since m was a copy of the called object, this did not cache anything. Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent 9b4714d commit b09f60e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sops.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ func (m *Metadata) UpdateMasterKeys(dataKey []byte) (errs []error) {
824824

825825
// GetDataKeyWithKeyServices retrieves the data key, asking KeyServices to decrypt it with each
826826
// MasterKey in the Metadata's KeySources until one of them succeeds.
827-
func (m Metadata) GetDataKeyWithKeyServices(svcs []keyservice.KeyServiceClient, decryptionOrder []string) ([]byte, error) {
827+
func (m *Metadata) GetDataKeyWithKeyServices(svcs []keyservice.KeyServiceClient, decryptionOrder []string) ([]byte, error) {
828828
if m.DataKey != nil {
829829
return m.DataKey, nil
830830
}

0 commit comments

Comments
 (0)