Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 883c5c63 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Fix build - keystore absolute path

parent fbe2f57e
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ public class UIKeystoreService {
LOG.error("Keystore file '{}' does not exists!", keystoreFilePath.getAbsolutePath());
return;
}
try {
smpKeyStorePasswordDecrypted = SecurityUtils.decrypt(file, smpKeyStorePasswordEncrypted);
} catch (SMPRuntimeException exception) {
......
......@@ -33,7 +33,7 @@ public class PropertiesMultipleDomainTestConfig {
@Bean
public PropertySourcesPlaceholderConfigurer setLocalProperties() {
Path resourceDirectory = Paths.get("src", "test", "resources", "keystores");
String path = resourceDirectory.toString();
String path = resourceDirectory.toFile().getAbsolutePath();;
return buildLocalProperties(new String[][]{
{"configuration.dir", path},
......
......@@ -35,7 +35,7 @@ public class PropertiesSingleDomainTestConfig {
public PropertySourcesPlaceholderConfigurer setLocalProperties() {
Path resourceDirectory = Paths.get("src", "test", "resources", "keystores");
String path = resourceDirectory.toString();
String path = resourceDirectory.toFile().getAbsolutePath();
return buildLocalProperties(new String[][]{
{"configuration.dir", path},
......
package eu.europa.ec.edelivery.smp.utils;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
......@@ -11,11 +12,17 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.Security;
import static org.junit.Assert.*;
public class SecurityUtilsTest {
@Before
public void setup(){
Security.insertProviderAt(new org.bouncycastle.jce.provider.BouncyCastleProvider(), 1);
}
@Test
public void generatePrivateSymmetricKey() throws IOException {
......
......@@ -47,7 +47,7 @@ public class PropertiesTestConfig {
localProps.setProperty( "spring.jpa.generate-ddl", "true");
localProps.setProperty( "spring.jpa.properties.hibernate.hbm2ddl.auto", "create");
localProps.setProperty( "configuration.dir", path);
localProps.setProperty("configuration.dir", path);
localProps.setProperty( "encryption.key.filename","encryptionKey.key");
localProps.setProperty( "smp.keystore.password", "FarFJE2WUfY39SVRTFOqSg==");
localProps.setProperty( "smp.keystore.filename", "smp-keystore_multiple_domains.jks");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment