Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

fix test port

parent 1ae5be38
No related branches found
No related tags found
No related merge requests found
......@@ -193,27 +193,32 @@ public class PropertyInitialization {
String encTrustEncToken;
if ( fileProperties.containsKey(SMPPropertyEnum.TRUSTSTORE_PASSWORD.getProperty())){
LOG.info("get token from properties");
encTrustEncToken = SecurityUtils.encryptWrappedToken(fEncryption,
fileProperties.getProperty(SMPPropertyEnum.TRUSTSTORE_PASSWORD.getProperty()));
}else {
// generate new token
LOG.info("generate token");
String trustToken = SecurityUtils.generateStrongPassword();
storeDBEntry(em, SMPPropertyEnum.TRUSTSTORE_PASSWORD_DECRYPTED, trustToken);
encTrustEncToken = SecurityUtils.encrypt(fEncryption, trustToken);
}
LOG.info("Store truststore security token to database");
// store token to database
storeDBEntry(em, SMPPropertyEnum.TRUSTSTORE_PASSWORD, encTrustEncToken);
properties.setProperty(SMPPropertyEnum.TRUSTSTORE_PASSWORD.getProperty(), encTrustEncToken);
LOG.info("Decode security token");
String trustToken = SecurityUtils.decrypt(fEncryption,encTrustEncToken);
LOG.info("Gest keystore");
File truststore;
if ( fileProperties.containsKey(SMPPropertyEnum.TRUSTSTORE_FILENAME.getProperty())){
LOG.info("Get truststore value from property file");
truststore = new File(absolutePath, fileProperties.getProperty(
SMPPropertyEnum.TRUSTSTORE_FILENAME.getProperty() ));
} else {
LOG.info("Generate truststore file ");
truststore = getNewFile(absolutePath, "smp-truststore.jks");
}
// store file to database
......
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