Skip to content

Commit

Permalink
Merge pull request #392 from slovensko-digital/fix/t-level-signature-…
Browse files Browse the repository at this point in the history
…detection

Consider signature form on signed files instead of level
  • Loading branch information
celuchmarek authored Jan 30, 2024
2 parents d0aa975 + b5e475a commit e9f3e95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/digital/slovensko/autogram/core/SigningJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -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:
;
Expand Down

0 comments on commit e9f3e95

Please sign in to comment.