diff --git a/src/main/java/digital/slovensko/autogram/core/SigningJob.java b/src/main/java/digital/slovensko/autogram/core/SigningJob.java index 18cce7d6..ba1e5d85 100644 --- a/src/main/java/digital/slovensko/autogram/core/SigningJob.java +++ b/src/main/java/digital/slovensko/autogram/core/SigningJob.java @@ -187,12 +187,12 @@ public static SigningJob buildFromFile(File file, Responder responder, boolean c private static SigningParameters getParametersForFile(FileDocument document, boolean checkPDFACompliance, SignatureLevel signatureType, boolean isEn319132, TSPSource tspSource, boolean plainXmlEnabled) { var level = SignatureValidator.getSignedDocumentSignatureLevel(document); - if (level != null) switch (level) { - case PAdES_BASELINE_B: + if (level != null) switch (level.getSignatureForm()) { + case PAdES: return SigningParameters.buildForPDF(document, checkPDFACompliance, isEn319132, tspSource); - case XAdES_BASELINE_B: + case XAdES: return SigningParameters.buildForASiCWithXAdES(document, isEn319132, tspSource, plainXmlEnabled); - case CAdES_BASELINE_B: + case CAdES: return SigningParameters.buildForASiCWithCAdES(document, isEn319132, tspSource, plainXmlEnabled); default: ;