aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2017-07-14 14:13:05 +0000
committerGerrit Code Review <gerrit@onap.org>2017-07-14 14:13:05 +0000
commite9352f759ff9863074517806c5351c001a5f6f5b (patch)
treedd7cfc35fa68bf815f84a145d7f68b7e3b691a50 /src/main
parent75401a8b463ab1fea926e081a74b4b0a3111d9b2 (diff)
parentb75cd1c9cb1e21c0dfba006e5fa99801a6aa9710 (diff)
Merge "Extract a constant in place of a hardcoded value"
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/openecomp/restclient/rest/RestClientBuilder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/openecomp/restclient/rest/RestClientBuilder.java b/src/main/java/org/openecomp/restclient/rest/RestClientBuilder.java
index 2dd19ac..0206941 100644
--- a/src/main/java/org/openecomp/restclient/rest/RestClientBuilder.java
+++ b/src/main/java/org/openecomp/restclient/rest/RestClientBuilder.java
@@ -65,6 +65,7 @@ public class RestClientBuilder {
private static final String SSL_PROTOCOL = "TLS";
private static final String KEYSTORE_ALGORITHM = "SunX509";
private static final String KEYSTORE_TYPE = "PKCS12";
+ private static final String TRUST_STORE_PROPERTY = "javax.net.ssl.trustStore";
private boolean validateServerHostname;
private boolean validateServerCertChain;
@@ -198,7 +199,7 @@ public class RestClientBuilder {
TrustManager[] trustAllCerts = null;
if (validateServerCertChain) {
if (truststoreFilename != null) {
- System.setProperty("javax.net.ssl.trustStore", truststoreFilename);
+ System.setProperty(TRUST_STORE_PROPERTY, truststoreFilename);
} else {
throw new IllegalArgumentException("Trust store filename must be set!");
}