From a99904402ba043319f7fd2d6db9edb76320800a4 Mon Sep 17 00:00:00 2001 From: ferbas Date: Mon, 2 Nov 2009 09:20:46 +0000 Subject: dynamic algorithm support, compatibility mode git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@379 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOAHelper.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOAHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOAHelper.java index 6b209a2..adcdc4e 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOAHelper.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOAHelper.java @@ -15,6 +15,8 @@ import java.util.regex.Pattern; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import at.gv.egiz.pdfas.algorithmSuite.AlgorithmMapper; +import at.gv.egiz.pdfas.algorithmSuite.AlgorithmSuiteObject; import at.gv.egiz.pdfas.algorithmSuite.AlgorithmSuiteUtil; import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException; import at.knowcenter.wag.egov.egiz.sig.SignatureObject; @@ -185,6 +187,9 @@ public class MOAHelper so.x509Certificate = cert; String algs = AlgorithmSuiteUtil.extractAlgorithmSuiteString(xmlResponse); + + AlgorithmSuiteObject suite = new AlgorithmSuiteObject(algs, false); + so.sigAlgorithm = AlgorithmMapper.getUri(suite.getSignatureMethod()); String defaultCertAlg = environment.getDefaultAlgForCert(cert); @@ -192,6 +197,8 @@ public class MOAHelper // do not embed default alg algs = null; } + + so.id = id_formatter.formatIds(null, algs); -- cgit v1.2.3