kopia lustrzana https://github.com/gaul/s3proxy
Disable AWS SDK SSL verification
rodzic
5f117c15a6
commit
2b29bcd588
|
@ -21,6 +21,7 @@ import java.net.URI;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.amazonaws.SDKGlobalConfiguration;
|
||||||
import com.amazonaws.auth.BasicAWSCredentials;
|
import com.amazonaws.auth.BasicAWSCredentials;
|
||||||
import com.amazonaws.services.s3.AmazonS3;
|
import com.amazonaws.services.s3.AmazonS3;
|
||||||
import com.amazonaws.services.s3.AmazonS3Client;
|
import com.amazonaws.services.s3.AmazonS3Client;
|
||||||
|
@ -43,6 +44,12 @@ import org.junit.Test;
|
||||||
import org.junit.rules.ExpectedException;
|
import org.junit.rules.ExpectedException;
|
||||||
|
|
||||||
public final class S3AwsSdkTest {
|
public final class S3AwsSdkTest {
|
||||||
|
static {
|
||||||
|
System.setProperty(
|
||||||
|
SDKGlobalConfiguration.DISABLE_CERT_CHECKING_SYSTEM_PROPERTY,
|
||||||
|
"true");
|
||||||
|
}
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
public ExpectedException thrown = ExpectedException.none();
|
public ExpectedException thrown = ExpectedException.none();
|
||||||
|
|
||||||
|
@ -75,10 +82,8 @@ public final class S3AwsSdkTest {
|
||||||
S3ProxyConstants.PROPERTY_IDENTITY);
|
S3ProxyConstants.PROPERTY_IDENTITY);
|
||||||
s3Credential = s3ProxyProperties.getProperty(
|
s3Credential = s3ProxyProperties.getProperty(
|
||||||
S3ProxyConstants.PROPERTY_CREDENTIAL);
|
S3ProxyConstants.PROPERTY_CREDENTIAL);
|
||||||
// The AWS client fails if certificate verification fails
|
|
||||||
s3Endpoint = new URI(s3ProxyProperties.getProperty(
|
s3Endpoint = new URI(s3ProxyProperties.getProperty(
|
||||||
S3ProxyConstants.PROPERTY_ENDPOINT).replaceAll(
|
S3ProxyConstants.PROPERTY_ENDPOINT));
|
||||||
"https", "http"));
|
|
||||||
String keyStorePath = s3ProxyProperties.getProperty(
|
String keyStorePath = s3ProxyProperties.getProperty(
|
||||||
S3ProxyConstants.PROPERTY_KEYSTORE_PATH);
|
S3ProxyConstants.PROPERTY_KEYSTORE_PATH);
|
||||||
String keyStorePassword = s3ProxyProperties.getProperty(
|
String keyStorePassword = s3ProxyProperties.getProperty(
|
||||||
|
|
Ładowanie…
Reference in New Issue