diff options
Diffstat (limited to 'bkucommon/src/main')
-rw-r--r-- | bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java | 17 | ||||
-rw-r--r-- | bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java | 4 |
2 files changed, 14 insertions, 7 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 3534636a..baadcc7d 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 @@ -103,7 +103,7 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement * The citizen card environment identifier for <code>Server</code> and * <code>UserAgent</code> headers. */ - protected static String CITIZENC_CARD_ENVIRONMENT = "citizen-card-environment/1.2"; + protected static String CITIZEN_CARD_ENVIRONMENT = "citizen-card-environment/1.2"; /** * The configuration facade used to access the MOCCA configuration. @@ -118,6 +118,8 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement public static final String USE_STYLESHEETURL_PROPERTY = "UseStylesheetURL"; + public static final String USE_XADES_1_4 = "UseXAdES14"; + public int getMaxDataUrlHops() { return configuration.getInt(DATAURLCLIENT_MAXHOPS, 10); } @@ -129,10 +131,9 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement } public String getProductVersion() { - return configuration - .getString( - ConfigurationFactoryBean.MOCCA_IMPLEMENTATIONVERSION_PROPERTY, - "UNKNOWN"); + return configuration.getString( + ConfigurationFactoryBean.MOCCA_IMPLEMENTATIONVERSION_PROPERTY, + "UNKNOWN") + (getUseXAdES14() ? "-X14" : ""); } public String getSignatureLayout() { @@ -164,6 +165,10 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement } return false; } + + public boolean getUseXAdES14() { + return configuration.getBoolean(USE_XADES_1_4, false); + } } /** @@ -615,7 +620,7 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement //---------------------------------------------------------------------------- public String getServerHeaderValue() { - return CITIZENC_CARD_ENVIRONMENT + " " + return CITIZEN_CARD_ENVIRONMENT + " " + configurationFacade.getProductName() + "/" + configurationFacade.getProductVersion(); } diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java index 903eae18..ffea6213 100644 --- a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/CreateXMLSignatureCommandImpl.java @@ -42,6 +42,7 @@ import org.w3c.dom.ls.LSSerializer; import at.buergerkarte.namespaces.securitylayer._1.CreateXMLSignatureRequestType; import at.buergerkarte.namespaces.securitylayer._1.DataObjectInfoType; +import at.gv.egiz.bku.binding.HTTPBindingProcessorImpl; import at.gv.egiz.bku.conf.MoccaConfigurationFacade; import at.gv.egiz.bku.slcommands.CreateXMLSignatureCommand; import at.gv.egiz.bku.slcommands.SLCommandContext; @@ -98,7 +99,8 @@ public class CreateXMLSignatureCommandImpl extends private Configuration configuration; public static final String USE_STRONG_HASH = "UseStrongHash"; - public static final String USE_XADES_1_4 = "UseXAdES14"; + public static final String USE_XADES_1_4 = + HTTPBindingProcessorImpl.ConfigurationFacade.USE_XADES_1_4; public void setConfiguration(Configuration configuration) { this.configuration = configuration; |