Skip to content

Commit

Permalink
remove EC from AES keyring test
Browse files Browse the repository at this point in the history
  • Loading branch information
kessplas committed Oct 29, 2024
1 parent ca4b0af commit 4b6f724
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import java.security.NoSuchAlgorithmException;
import java.security.Provider;
import java.security.Security;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.ExecutorService;
Expand All @@ -42,7 +40,6 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static software.amazon.encryption.s3.S3EncryptionClient.withAdditionalConfiguration;
import static software.amazon.encryption.s3.utils.S3EncryptionClientTestResources.BUCKET;
import static software.amazon.encryption.s3.utils.S3EncryptionClientTestResources.appendTestSuffix;
import static software.amazon.encryption.s3.utils.S3EncryptionClientTestResources.deleteObject;
Expand Down Expand Up @@ -549,19 +546,14 @@ public void AsyncAesGcmV3toV3LargeObjectCRT() throws IOException {
.build();
ExecutorService singleThreadExecutor = Executors.newSingleThreadExecutor();

Map<String, String> encryptionContext = new HashMap<>();
encryptionContext.put("user-metadata-key", "user-metadata-value-v3-to-v3");

CompletableFuture<PutObjectResponse> futurePut = asyncClient.putObject(builder -> builder
.bucket(BUCKET)
.overrideConfiguration(withAdditionalConfiguration(encryptionContext))
.key(objectKey), AsyncRequestBody.fromInputStream(inputStream, fileSizeLimit, singleThreadExecutor));
futurePut.join();
singleThreadExecutor.shutdown();

CompletableFuture<ResponseInputStream<GetObjectResponse>> getFuture = asyncClient.getObject(builder -> builder
.bucket(BUCKET)
.overrideConfiguration(S3EncryptionClient.withAdditionalConfiguration(encryptionContext))
.key(objectKey), AsyncResponseTransformer.toBlockingInputStream());
ResponseInputStream<GetObjectResponse> output = getFuture.join();

Expand Down

0 comments on commit 4b6f724

Please sign in to comment.