(1) It's a System.Security.Cryptography.X509Certificates.X509Certificate.
(2) See (1).

Paulo

----- Original Message ----- 
From: <[email protected]>
To: "iTextSharp" <[email protected]>
Sent: Monday, July 06, 2009 11:15 PM
Subject: [iText-questions] How to sign with a smartcard using an 
externalsignature dictionary with iTextSharp, CAPICOM and .NET 1.1


Hi all,

In 'How to sign a PDF using iText and iTextSharp', I am referring to the 
email subject paragraph
and I am having problems with the function,

Public Function GetChain(ByVal cer As Certificate) As 
Org.BouncyCastle.X509.X509Certificate()
        Dim context As ICertContext = CType(cer, ICertContext)
        Dim ptr As IntPtr = New IntPtr(context.CertContext)
(1)   Dim xCert As X509Certificate = New X509Certificate(ptr)
        Dim cp As Org.BouncyCastle.X509.X509CertificateParser = New 
Org.BouncyCastle.X509.X509CertificateParser
(2)   Dim chain() As Org.BouncyCastle.X509.X509Certificate = New 
Org.BouncyCastle.X509.X509Certificate() 
{cp.ReadCertificate(xCert.GetRawCertData())} 'GetRawCertData()
        Return chain
End Function

(1) I cannot create an instance of X509Certificate with ptr as argument 
because the only argument you can pass to the class is
type of Org.BouncyCastle.Asn1.X509.X509CertificateStructure.

(2) I cannot create the chain() array because xCert does not accept 
GetRawCertData()

Does anybody know how is it?

Thanks in advance,
Jose Alvarez de Lara


------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to