Skip to content

Commit

Permalink
set bigger content size for pades with TS
Browse files Browse the repository at this point in the history
  • Loading branch information
celuchmarek committed Feb 5, 2024
1 parent e9f3e95 commit 5e5f0f6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ private DSSDocument signDocumentAsPAdeS(SigningKey key) {
signatureParameters.setCertificateChain(key.getCertificateChain());
signatureParameters.setSignWithExpiredCertificate(true);

if (signatureParameters.getSignatureLevel().equals(SignatureLevel.PAdES_BASELINE_T))
if (signatureParameters.getSignatureLevel().equals(SignatureLevel.PAdES_BASELINE_T)) {
service.setTspSource(getParameters().getTspSource());
signatureParameters.setContentSize(9472*2);
}

var dataToSign = service.getDataToSign(getDocument(), signatureParameters);
var signatureValue = key.sign(dataToSign, jobParameters.getDigestAlgorithm());
Expand Down

0 comments on commit 5e5f0f6

Please sign in to comment.