CopyObject: fix regression in key rotation (#6331)

After key rotation, metadata was not being replaced with new sealed key.
Regression introduced in commit e71ef905f9547514d1f2ebf1732be8f2a6e094f7
This commit is contained in:
poornas 2018-08-21 15:12:00 -07:00 committed by kannappanr
parent 68b9e9e7e7
commit 19db921555

View File

@ -147,6 +147,7 @@ func rotateKey(oldKey []byte, newKey []byte, bucket, object string, metadata map
}
copy(extKey[:], newKey)
sealedKey = objectKey.Seal(extKey, sealedKey.IV, crypto.SSEC.String(), bucket, object)
crypto.SSEC.CreateMetadata(metadata, sealedKey)
return nil
}
}