Skip to content

Commit 1a8f331

Browse files
committed
more cleanup
1 parent d008c2c commit 1a8f331

File tree

4 files changed

+2
-41
lines changed

4 files changed

+2
-41
lines changed

pom.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,6 @@
112112
<version>1.2</version>
113113
</dependency>
114114

115-
<dependency>
116-
<groupId>org.apache.logging.log4j</groupId>
117-
<artifactId>log4j-slf4j2-impl</artifactId>
118-
<version>2.24.3</version>
119-
<scope>compile</scope>
120-
</dependency>
121-
122-
<dependency>
123-
<groupId>software.amazon.cryptools</groupId>
124-
<artifactId>AmazonCorrettoCryptoProvider</artifactId>
125-
<version>[2.0, 3.0)</version>
126-
<classifier>linux-x86_64</classifier>
127-
<scope>test</scope>
128-
</dependency>
129-
130115
<dependency>
131116
<groupId>com.sun.xml.messaging.saaj</groupId>
132117
<artifactId>saaj-impl</artifactId>

src/examples/java/software/amazon/encryption/s3/examples/MultipartUploadExample.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package software.amazon.encryption.s3.examples;
22

3-
import com.amazon.corretto.crypto.provider.AmazonCorrettoCryptoProvider;
43
import org.apache.commons.io.IOUtils;
54
import software.amazon.awssdk.core.ResponseInputStream;
65
import software.amazon.awssdk.core.sync.RequestBody;
@@ -18,8 +17,6 @@
1817
import java.io.ByteArrayOutputStream;
1918
import java.io.IOException;
2019
import java.io.InputStream;
21-
import java.security.Provider;
22-
import java.security.Security;
2320
import java.util.ArrayList;
2421
import java.util.HashMap;
2522
import java.util.List;
@@ -35,7 +32,7 @@ public class MultipartUploadExample {
3532
public static void main(final String[] args) throws IOException {
3633
BUCKET = args[0];
3734
LowLevelMultipartUpload();
38-
// HighLevelMultipartPutObject();
35+
HighLevelMultipartPutObject();
3936
}
4037

4138
/**
@@ -55,9 +52,6 @@ public static void LowLevelMultipartUpload() throws IOException {
5552
final InputStream inputStream = new BoundedInputStream(fileSizeLimit);
5653
final InputStream objectStreamForResult = new BoundedInputStream(fileSizeLimit);
5754

58-
Security.addProvider(new AmazonCorrettoCryptoProvider());
59-
Provider PROVIDER = Security.getProvider(AmazonCorrettoCryptoProvider.PROVIDER_NAME);
60-
6155
// Instantiate the S3 Encryption Client to encrypt and decrypt
6256
// by specifying a KMS Key with the kmsKeyId builder parameter.
6357
// enable `enableDelayedAuthenticationMode` parameter to download more than 64MB object or
@@ -68,7 +62,6 @@ public static void LowLevelMultipartUpload() throws IOException {
6862
S3Client v3Client = S3EncryptionClient.builder()
6963
.kmsKeyId(KMS_KEY_ID)
7064
.enableDelayedAuthenticationMode(true)
71-
.cryptoProvider(PROVIDER)
7265
.build();
7366

7467
// Create Multipart upload request to S3

src/main/resources/log4j2.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/test/java/software/amazon/encryption/s3/S3EncryptionClientRangedGetCompatibilityTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.amazonaws.services.s3.model.KMSEncryptionMaterialsProvider;
1414
import com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider;
1515
import org.junit.jupiter.api.BeforeAll;
16+
import org.junit.jupiter.params.ParameterizedTest;
1617
import org.junit.jupiter.params.provider.MethodSource;
1718
import software.amazon.awssdk.core.ResponseBytes;
1819
import software.amazon.awssdk.core.async.AsyncRequestBody;

0 commit comments

Comments
 (0)