aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/HealthCheckScheduledTask.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/HealthCheckScheduledTask.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/HealthCheckScheduledTask.java
index 0db9fe9a44..c7c0e9e4e6 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/HealthCheckScheduledTask.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/HealthCheckScheduledTask.java
@@ -147,11 +147,22 @@ public class HealthCheckScheduledTask implements Runnable {
private ClientCertificate getHttpClientCertificate() {
ClientCertificate clientCertificate = new ClientCertificate();
- clientCertificate.setKeyStore(JettySSLUtils.getSSLConfig().getKeystorePath());
- clientCertificate.setKeyStorePassword(JettySSLUtils.getSSLConfig().getKeystorePass(), false);
- clientCertificate.setTrustStore(JettySSLUtils.getSSLConfig().getTruststorePath());
- clientCertificate.setTrustStorePassword(JettySSLUtils.getSSLConfig().getTruststorePass());
- return clientCertificate;
+ boolean certificateInfoConfigured = false;
+ if (StringUtils.isNotBlank(JettySSLUtils.getSSLConfig().getKeystorePath())) {
+ clientCertificate.setKeyStore(JettySSLUtils.getSSLConfig().getKeystorePath());
+ if (StringUtils.isNotBlank(JettySSLUtils.getSSLConfig().getKeystorePass())) {
+ clientCertificate.setKeyStorePassword(JettySSLUtils.getSSLConfig().getKeystorePass(), false);
+ }
+ certificateInfoConfigured = true;
+ }
+ if (StringUtils.isNotBlank(JettySSLUtils.getSSLConfig().getTruststorePath())) {
+ clientCertificate.setTrustStore(JettySSLUtils.getSSLConfig().getTruststorePath());
+ if (StringUtils.isNotBlank(JettySSLUtils.getSSLConfig().getTruststorePass())) {
+ clientCertificate.setTrustStorePassword(JettySSLUtils.getSSLConfig().getTruststorePass());
+ }
+ certificateInfoConfigured = true;
+ }
+ return certificateInfoConfigured ? clientCertificate: null;
}
private String getExternalComponentHcUri(String baseComponent) {