diff options
Diffstat (limited to 'certServiceClient/src/main')
2 files changed, 7 insertions, 5 deletions
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/certification/conversion/PKCS12FilesCreator.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/certification/conversion/PKCS12FilesCreator.java index 60121b03..d8c41bfd 100644 --- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/certification/conversion/PKCS12FilesCreator.java +++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/certification/conversion/PKCS12FilesCreator.java @@ -21,6 +21,8 @@ package org.onap.aaf.certservice.client.certification.conversion; import java.io.FileOutputStream; import java.io.IOException; +import java.nio.file.Path; + import org.onap.aaf.certservice.client.certification.exception.PemToPKCS12ConverterException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,10 +41,10 @@ class PKCS12FilesCreator { PKCS12FilesCreator(String path) { - keystoreJksPath = path + KEYSTORE_JKS; - keystorePassPath = path + KEYSTORE_PASS; - truststoreJksPath = path + TRUSTSTORE_JKS; - truststorePassPath = path + TRUSTSTORE_PASS; + keystoreJksPath = Path.of(path, KEYSTORE_JKS).toString(); + keystorePassPath = Path.of(path, KEYSTORE_PASS).toString(); + truststoreJksPath = Path.of(path, TRUSTSTORE_JKS).toString(); + truststorePassPath = Path.of(path, TRUSTSTORE_PASS).toString(); } void saveKeystoreData(byte[] keystoreData, String keystorePassword) throws PemToPKCS12ConverterException { diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvValidationUtils.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvValidationUtils.java index e65d688d..b0405274 100644 --- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvValidationUtils.java +++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvValidationUtils.java @@ -27,7 +27,7 @@ public final class EnvValidationUtils { private EnvValidationUtils() {} public static Boolean isPathValid(String path) { - return path.matches("^/|(/[a-zA-Z0-9_-]+)+$"); + return path.matches("^/|(/[a-zA-Z0-9_-]+)+/?$"); } public static Boolean isAlphaNumeric(String caName) { |