I want to sign PDF Files with itextsharp. Since now, i embedded the CRLs into the Signature. This has made my PDF really huge. A 300 KB PDF went up to over 1 MB in size.
So i decided to embed the OCSP-Responses instead of the CRLs.
Here is the particular Code:
byte[] ocsp = null;
if ((chain.Count >= 2) && (ocspClient != null))
{
ocsp = ocspClient.GetEncoded(list[0], list[1], null);
}
byte[] message = fpkcs.getAuthenticatedAttributeBytes(secondDigest, now, ocsp, crlBytes, sigtype);
byte[] digest = Sign(message, cert);
fpkcs.SetExternalDigest(digest, null, "RSA");
byte[] sourceArray = fpkcs.GetEncodedPKCS7(secondDigest, now, tsaClient, ocsp, crlBytes, sigtype);
If I'm right: In order to have a LTV-enabled Signature, OCSP-Responses of all Certificates (exept the Root-Cert) have to be embedded in the Signature. But if I'm using the above Code, only the OCSP-Response of the Signer-Cert is embedded into the Signature. The CA-Cert is checked online if I open the PDF in Adobe Reader. So the Signature is not LTV-Enabled.
Can anybody tell me how I can embed multiple OCSP-Responses into the Signature?
Many Thanks for any help!!