diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java
index e2a6d0e..af181eb 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java
@@ -116,13 +116,13 @@
         return new NoopHostnameVerifier();
     }
 
-    private String getKeystorePath() {
-        return getCertificatesPath() + FileSystems.getDefault().getSeparator() + systemPropertyHelper.getAAIKeystoreFilename();
+    protected String getKeystorePath() {
+        return systemPropertyHelper.getAAIKeystoreFilename().map(this::getCertificatesPathOf).orElse("");
     }
 
     private void setSystemProperties() {
-        System.setProperty(SSL_TRUST_STORE, getCertificatesPath() + FileSystems.getDefault().getSeparator() +
-                systemPropertyHelper.getAAITruststoreFilename().orElse(""));
+        System.setProperty(SSL_TRUST_STORE,
+            systemPropertyHelper.getAAITruststoreFilename().map(this::getCertificatesPathOf).orElse(""));
         System.setProperty(SSL_TRUST_STORE_PASS_WORD, systemPropertyHelper.getDecryptedTruststorePassword());
     }
 
@@ -135,8 +135,11 @@
         return config;
     }
 
-    private String getCertificatesPath() {
-        return certFilePath;
+    private String getCertificatesPathOf(String fileName) {
+        if (fileName.contains("/") || fileName.contains("\\")) {
+            return fileName;
+        }
+        return certFilePath + FileSystems.getDefault().getSeparator() + fileName;
     }
 
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/util/HttpsAuthClientTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/util/HttpsAuthClientTest.java
index 3336a8a..b48efd6 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/util/HttpsAuthClientTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/util/HttpsAuthClientTest.java
@@ -22,6 +22,7 @@
 package org.onap.vid.aai.util;
 
 
+import java.nio.file.FileSystems;
 import org.mockito.Mock;
 
 import org.onap.vid.aai.exceptions.HttpClientBuilderException;
@@ -33,6 +34,7 @@
 import javax.net.ssl.SSLContext;
 import java.util.Optional;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.*;
 import static org.mockito.MockitoAnnotations.initMocks;
@@ -55,6 +57,7 @@
     public void setUp() throws Exception {
         initMocks(this);
         when(systemPropertyHelper.getAAITruststoreFilename()).thenReturn(Optional.of("filename"));
+        when(systemPropertyHelper.getAAIKeystoreFilename()).thenReturn(Optional.of("keystorefilename"));
         when(systemPropertyHelper.getDecryptedKeystorePassword()).thenReturn("password");
         when(systemPropertyHelper.getDecryptedTruststorePassword()).thenReturn("password");
     }
@@ -79,6 +82,34 @@
     }
 
     @Test
+    public void getKeystorePath_whenNotConfigured_yieldEmptyString() {
+        // when
+        when(sslContextProvider.getSslContext(anyString(), anyString(), any())).thenReturn(sslContext);
+
+        //then
+        assertThat(createTestSubject().getKeystorePath()).isEqualTo(CERT_FILE_PATH + FileSystems.getDefault().getSeparator() + "keystorefilename");
+    }
+
+    @Test
+    public void getKeystorePath_whenConfigured_yieldPathAndFile() {
+        // when
+        when(systemPropertyHelper.getAAIKeystoreFilename()).thenReturn(Optional.empty());
+
+        //then
+        assertThat(createTestSubject().getKeystorePath()).isEqualTo("");
+    }
+
+    @Test
+    public void getKeystorePath_whenConfiguredWithSlash_yieldFilenameWithoutPath() {
+        // when
+        final String filenameWithSlash = "/path/to/keystorefilename";
+        when(systemPropertyHelper.getAAIKeystoreFilename()).thenReturn(Optional.of(filenameWithSlash));
+
+        //then
+        assertThat(createTestSubject().getKeystorePath()).isEqualTo(filenameWithSlash);
+    }
+
+    @Test
     public void testGetUnsecuredClient() throws Exception {
         // when
         when(systemPropertyHelper.isClientCertEnabled()).thenReturn(false);
