summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorrenealr <reneal.rogers@amdocs.com>2018-11-12 12:23:28 -0500
committerrenealr <reneal.rogers@amdocs.com>2018-11-12 12:24:40 -0500
commitef858ed661134e651082675c091db056f8add98d (patch)
tree9220866bd9ee06b5382bdbfe96c4f3d8452f5fad /src/main
parente7be95cd0a245e6b7a7cb520c1a3f94b5604b964 (diff)
remove ability to disable cert chain validation
Remove the ability to disbale certificate chain validation Issue-ID: AAI-1908 Change-Id: I5803cec657594bfbc814be1e0122a67206d28cc4 Signed-off-by: renealr <reneal.rogers@amdocs.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/aai/restclient/rest/RestClientBuilder.java16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/main/java/org/onap/aai/restclient/rest/RestClientBuilder.java b/src/main/java/org/onap/aai/restclient/rest/RestClientBuilder.java
index 310a059..26c5fdf 100644
--- a/src/main/java/org/onap/aai/restclient/rest/RestClientBuilder.java
+++ b/src/main/java/org/onap/aai/restclient/rest/RestClientBuilder.java
@@ -201,28 +201,12 @@ public class RestClientBuilder {
// Check to see if we need to perform proper validation of
// the certificate chains.
TrustManager[] trustAllCerts = null;
- if (validateServerCertChain) {
if (truststoreFilename != null) {
System.setProperty(TRUST_STORE_PROPERTY, truststoreFilename);
} else {
throw new IllegalArgumentException("Trust store filename must be set!");
}
- } else {
-
- // We aren't validating certificates, so create a trust manager that does
- // not validate certificate chains.
- trustAllCerts = new TrustManager[] {new X509TrustManager() {
- public X509Certificate[] getAcceptedIssuers() {
- return null;
- }
-
- public void checkClientTrusted(X509Certificate[] certs, String authType) {}
-
- public void checkServerTrusted(X509Certificate[] certs, String authType) {}
- }};
- }
-
// Set up the SSL context, keystore, etc. to use for our connection
// to the AAI.
SSLContext ctx = SSLContext.getInstance(sslProtocol);