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

Skip to content
Snippets Groups Projects

fixed

Merged Nelson Ferreira requested to merge improvement/bouncy-castle-bump into develop
2 files
+ 3
11
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -63,7 +63,7 @@ public class CsJAdESSignature {
List<DSSPrivateKeyEntry> keys = token.getKeys();
for (DSSPrivateKeyEntry entry : keys) {
privateKey = entry;
log.debug(entry.getCertificate().getCertificate().toString());
log.debug("{}", entry.getCertificate().getCertificate().toString());
}
// JAdES signature params
@@ -122,7 +122,7 @@ public class CsJAdESSignature {
prop.load(input);
CertificateProperties properties = new CertificateProperties();
properties.setFilename(prop.getProperty("certificate.filename"));
properties.setPassword(replaceWithEnvironmentVariable(prop.getProperty("certificate.password")));
properties.setPassword(prop.getProperty("certificate.password"));
return properties;
} catch (IOException ex) {
log.error("An error occurred while loading config.");
@@ -130,14 +130,6 @@ public class CsJAdESSignature {
return null;
}
private static String replaceWithEnvironmentVariable(String value){
if(value.startsWith("${") && value.endsWith("}")){
String envVarName = value.substring(value.indexOf("${")+2, value.indexOf("}"));
return System.getenv(envVarName);
}
return null;
}
private InputStream loadCertificate(String filename) {
InputStream inputStream;
try {
Loading