Sign document error when using Azure Key Vault: DefaultSignatureLength parameter

Hello,

I am evaluating the GroupDocs.Signature product before purchasing, I am trying to generate a signed PDF signed with Azure Key Vault… I am following the documentation provided, but when I call the sign method I am getting the exception below. The PDF output is still created, but the Signature shows as invalid. Can you please let me know what I might be missing? Thanks!

Sign document error: The signature length specified in the DefaultSignatureLength parameter is less than the length of the received signature. Current signature length: 5620. Set the DefaultSignatureLength parameter to a value greater than this value

            var azureSigner = new AzureSigner(keyVaultUrl, certificateName, certificateKeyId, tenantId, clientId, clientSecret);
            options.CustomSignHash = azureSigner;
            options.Signature.Certificate = azureSigner.GetPublicCertificateFromAzureStorage();
            
            using (var signature = new Signature(sourcePdfPath))
            {
                try
                {
                    signature.Sign(outputPdfPath, options);
                }
                catch (Exception ex)
                {
                    Console.WriteLine($"Error Signing: {ex.Message}");
                }
            }

Hello @mrpalma! Thank you for your interest in our product.
It looks like there is a limitation on the signature length but I think we can increase it. Let me check and get back to you with more details. I’ve created a ticket for your issue: #SIGNATURENET-5654

1 Like

Thanks @yanaLi ! Do you have an estimate on when this update would be available? We need to make a decision this week on the API to use and without this update we will not be able to use groupdocs.

Thanks!

mrpalma I’ve checked and we can increase the signature size limit. We’re planning to publish the updated release this week. I’ll notify you as soon as the new version is available for download