aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorRyan Goulding <ryandgoulding@gmail.com>2017-07-06 06:47:28 -0400
committerRyan Goulding <ryandgoulding@gmail.com>2017-07-11 16:00:32 +0000
commitb75cd1c9cb1e21c0dfba006e5fa99801a6aa9710 (patch)
tree5ef60ffac8b3dd6b60aaae8c2b3d3afce2991a7c /src/main/java
parentda669cac0eb4e1832082ffb91cf24f998c114dee (diff)
Extract a constant in place of a hardcoded value
This is a bit cleaner IMO but open to suggestions. Change-Id: I074f18eb93aee5582629d04c21295a07bc45c089 Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Diffstat (limited to 'src/main/java')
-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!");
}