Resubmitting KeyProperty code change since tests failed
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / service / ApplicationsRestClientServiceImpl.java
index 959e392..ab504fb 100644 (file)
@@ -67,6 +67,8 @@ import org.onap.portalapp.util.SystemType;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
 import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
 import org.onap.portalsdk.core.util.SystemProperties;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -194,7 +196,7 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient
                        if(!encriptedPwd.isEmpty() || encriptedPwd != null || StringUtils.isEmpty(encriptedPwd)){
                        try {
                                decreptedAppPwd = CipherUtil.decryptPKC(encriptedPwd,
-                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                                               KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
                        } catch (Exception e) {
                                logger.error(EELFLoggerDelegate.errorLogger, "createClientFor failed to decrypt", e);
                        }
@@ -215,7 +217,7 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient
                                String decreptedexternalAppPwd = StringUtils.EMPTY;
                                try {
                                        decreptedexternalAppPwd = CipherUtil.decryptPKC(password,
-                                                       SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                                                       KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
                                } catch (CipherUtilException e) {
                                        logger.error(EELFLoggerDelegate.errorLogger, "failed to decreptedexternalAppPwd when external app pwd is null", e);
                                }