fix: encrypt checksums in metadata (#15620)

This commit is contained in:
Klaus Post
2022-08-31 17:13:23 +02:00
committed by GitHub
parent dec942beb6
commit 8e4a45ec41
14 changed files with 118 additions and 162 deletions
+4 -1
View File
@@ -962,7 +962,10 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
}
fi.DataDir = mustGetUUID()
fi.Checksum = opts.WantChecksum.AsMap()
fi.Checksum = opts.WantChecksum.AppendTo(nil)
if opts.EncryptFn != nil {
fi.Checksum = opts.EncryptFn("object-checksum", fi.Checksum)
}
uniqueID := mustGetUUID()
tempObj := uniqueID