Skip to content

Commit

Permalink
disable key rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
minio-trusted committed Mar 12, 2018
1 parent 26e7836 commit 8d6a70b
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions functional_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -5859,40 +5859,40 @@ func testEncryptedCopyObjectWrapper(c *minio.Client) {
reader.Close()

// Test key rotation for source object in-place.
dst, err = minio.NewDestinationInfo(bucketName, "srcObject", &key2, nil)
if err != nil {
logError(testName, function, args, startTime, "", "NewDestinationInfo failed", err)
return
}
args["destination"] = dst

err = c.CopyObject(dst, src)
if err != nil {
logError(testName, function, args, startTime, "", "CopyObject failed", err)
return
}

// Get copied object and check if content is equal
opts = minio.GetObjectOptions{}
for k, v := range key2.GetSSEHeaders() {
opts.Set(k, v)
}
reader, err = c.GetObject(bucketName, "srcObject", opts)
if err != nil {
logError(testName, function, args, startTime, "", "GetObject failed", err)
return
}

decBytes, err = ioutil.ReadAll(reader)
if err != nil {
logError(testName, function, args, startTime, "", "ReadAll failed", err)
return
}
if !bytes.Equal(decBytes, buf) {
logError(testName, function, args, startTime, "", "Downloaded object mismatched for encrypted object", err)
return
}
reader.Close()
// dst, err = minio.NewDestinationInfo(bucketName, "srcObject", &key2, nil)
// if err != nil {
// logError(testName, function, args, startTime, "", "NewDestinationInfo failed", err)
// return
// }
// args["destination"] = dst

// err = c.CopyObject(dst, src)
// if err != nil {
// logError(testName, function, args, startTime, "", "CopyObject failed", err)
// return
// }

// // Get copied object and check if content is equal
// opts = minio.GetObjectOptions{}
// for k, v := range key2.GetSSEHeaders() {
// opts.Set(k, v)
// }
// reader, err = c.GetObject(bucketName, "srcObject", opts)
// if err != nil {
// logError(testName, function, args, startTime, "", "GetObject failed", err)
// return
// }

// decBytes, err = ioutil.ReadAll(reader)
// if err != nil {
// logError(testName, function, args, startTime, "", "ReadAll failed", err)
// return
// }
// if !bytes.Equal(decBytes, buf) {
// logError(testName, function, args, startTime, "", "Downloaded object mismatched for encrypted object", err)
// return
// }
// reader.Close()

// Test in-place decryption.
dst, err = minio.NewDestinationInfo(bucketName, "srcObject", nil, nil)
Expand All @@ -5902,7 +5902,7 @@ func testEncryptedCopyObjectWrapper(c *minio.Client) {
}
args["destination"] = dst

src = minio.NewSourceInfo(bucketName, "srcObject", &key2)
src = minio.NewSourceInfo(bucketName, "srcObject", &key1)
args["source"] = src
err = c.CopyObject(dst, src)
if err != nil {
Expand Down

0 comments on commit 8d6a70b

Please sign in to comment.