Hi,
I'm writing application which is using certificate on smart card to sign
.pdf file (using provided .NET 2.0 example). Also it should embed
certificate CRL. When I open generated .pdf from Adobe Reader X and look at
Signature properties->Signer->Show certificate->Revocation it show it is
using local cache for CRL (The selected certificate is considered valid
because it does not appear in the Certificate Revocation List (CRL) that is
contained in the local cache.).
Code that is used is:
/* Get whole certificate chain: from root CA certificate to certificate
that is used for signing */
Org.BouncyCastle.X509.X509Certificate[] chain = GetCertChain(smartCard);
/* Get CRLs for all non root CA certificates */
X509Crl[] crls=GetCRLList(chain);
PdfReader reader = new PdfReader(srcPdfFilePath);
PdfStamper stp = PdfStamper.CreateSignature(reader, new
FileStream(dstPdfFilePath,
FileMode.Create), '\0');
PdfSignatureAppearance sap = stp.SignatureAppearance;
...
sap.SetCrypto(null, chain, crls, PdfSignatureAppearance.WINCER_SIGNED);
...
I'm using itextsharp 5.1.3.
All references on Internet I could find are from 2007 and 2009 year (itext
2.x.x). One of them states that PdfPKCS7 class is patched to allow this but
I'm not sure how could I use it when certificate is on smart card.
Any help will be appreciated.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php