summaryrefslogtreecommitdiff
path: root/bkucommon/src
diff options
context:
space:
mode:
Diffstat (limited to 'bkucommon/src')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java2
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java9
2 files changed, 5 insertions, 6 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
index fcaa1be6..98218e52 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
@@ -143,7 +143,7 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement
String signatureLayout = configuration
.getString(ConfigurationFactoryBean.SIGNATURE_LAYOUT_PROPERTY);
- if (getUseXAdES14() && signatureLayout.equals("1.0"))
+ if (getUseXAdES14() && "1.0".equals(signatureLayout))
signatureLayout = "1.1"; //bump SignatureLayout version to prevent PDF-AS from generating invalid signatures
return signatureLayout;
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java b/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
index ce318876..47e1320a 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
@@ -46,6 +46,7 @@ import org.springframework.core.io.ResourceLoader;
import at.gv.egiz.bku.conf.MoccaConfigurationException;
import at.gv.egiz.bku.slcommands.impl.CreateXMLSignatureCommandImpl;
+import at.gv.egiz.bku.utils.JarLocation;
/**
* This is a {@link FactoryBean} for the creation of a {@link Configuration}.
@@ -140,10 +141,10 @@ public class ConfigurationFactoryBean implements FactoryBean, ResourceLoaderAwar
// signature layout
try {
- String classContainer = CreateXMLSignatureCommandImpl.class.getProtectionDomain()
- .getCodeSource().getLocation().toString();
+ String classContainer = JarLocation.get(CreateXMLSignatureCommandImpl.class);
URL manifestUrl = new URL("jar:" + classContainer
+ "!/META-INF/MANIFEST.MF");
+ log.debug(manifestUrl.toString());
Manifest manifest = new Manifest(manifestUrl.openStream());
Attributes attributes = manifest.getMainAttributes();
String signatureLayout = attributes.getValue("SignatureLayout");
@@ -153,10 +154,8 @@ public class ConfigurationFactoryBean implements FactoryBean, ResourceLoaderAwar
} catch (Exception e) {
log.warn("Failed to get signature layout from manifest.", e);
}
-
-
+
return new MapConfiguration(map);
-
}
@Override