Skip to content

Commit

Permalink
Merge pull request #314 from solver-it-sro/AG-152/packaging-update
Browse files Browse the repository at this point in the history
Clean up swagger for eforms and use default packaging with eforms
  • Loading branch information
celuchmarek authored Nov 7, 2023
2 parents 1eff5ec + 2fff21d commit 010a812
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package digital.slovensko.autogram.core;

import java.util.List;

import javax.xml.crypto.dsig.CanonicalizationMethod;

import digital.slovensko.autogram.core.errors.AutogramException;
import digital.slovensko.autogram.core.errors.SigningParametersException;
import digital.slovensko.autogram.core.errors.TransformationParsingErrorException;
import digital.slovensko.autogram.util.AsicContainerUtils;
import digital.slovensko.autogram.core.eforms.EFormResources;
import digital.slovensko.autogram.core.eforms.EFormUtils;
Expand Down Expand Up @@ -222,6 +219,7 @@ private static SigningParameters buildParameters(SignatureLevel level, ASiCConta
identifier = eformAttributes.identifier();
containerXmlns = eformAttributes.containerXmlns();
container = eformAttributes.container();
packaging = eformAttributes.packaging();
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package digital.slovensko.autogram.core.eforms;

import eu.europa.esig.dss.enumerations.ASiCContainerType;
import eu.europa.esig.dss.enumerations.SignaturePackaging;

public record EFormAttributes(String identifier, String transformation, String schema, String containerXmlns,
ASiCContainerType container) {
ASiCContainerType container, SignaturePackaging packaging) {

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import eu.europa.esig.dss.enumerations.ASiCContainerType;
import eu.europa.esig.dss.enumerations.DigestAlgorithm;
import eu.europa.esig.dss.enumerations.SignaturePackaging;
import eu.europa.esig.dss.model.DSSDocument;
import eu.europa.esig.dss.model.InMemoryDocument;

Expand Down Expand Up @@ -47,8 +48,9 @@ public static EFormAttributes tryToLoadEFormAttributes(DSSDocument document, Str
var identifier = eformResources.getIdentifier();
var containerXmlns = "http://data.gov.sk/def/container/xmldatacontainer+xml/1.1";
var container = ASiCContainerType.ASiC_E;
var packaging = SignaturePackaging.ENVELOPING;

return new EFormAttributes(identifier, transformation, schema, containerXmlns, container);
return new EFormAttributes(identifier, transformation, schema, containerXmlns, container, packaging);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,6 @@ components:
parameters:
autoLoadEform: true
level: XAdES_BASELINE_B
container: ASiC_E
identifier: "http://data.gov.sk/doc/eform/App.GeneralAgenda/1.9"
containerXmlns: http://data.gov.sk/def/container/xmldatacontainer+xml/1.1
payloadMimeType: application/xml

XAdES-ASiC_E-SKXDC-Base64-TXT:
Expand Down Expand Up @@ -714,7 +711,6 @@ components:
parameters:
autoLoadEform: true
level: XAdES_BASELINE_B
container: ASiC_E
payloadMimeType: "application/vnd.etsi.asic-e+zip; base64"

Signed-XAdES-ASiC_E-SKXDC-Auto-WrongXSLT:
Expand All @@ -724,7 +720,6 @@ components:
parameters:
autoLoadEform: true
level: XAdES_BASELINE_B
container: ASiC_E
payloadMimeType: "application/vnd.etsi.asic-e+zip; base64"

PAdES-PDF_lg:
Expand Down

0 comments on commit 010a812

Please sign in to comment.