Add size of the raw issuer which is added by AddSignerChain

This commit is contained in:
Paul van Brouwershaven
2024-08-08 12:51:00 +02:00
committed by Paul van Brouwershaven
parent bbed2ea2a1
commit 6ad18001af

View File

@@ -213,6 +213,9 @@ func (context *SignContext) SignPDF() error {
context.SignatureMaxLength += uint32(hex.EncodedLen(len(degenerated)))
// Add size of the raw issuer which is added by AddSignerChain
context.SignatureMaxLength += uint32(hex.EncodedLen(len(context.SignData.Certificate.RawIssuer)))
// Add size for certificate chain.
var certificate_chain []*x509.Certificate
if len(context.SignData.CertificateChains) > 0 && len(context.SignData.CertificateChains[0]) > 1 {