Probably an ignored exception or a missing close. Paulo
----- Original Message ----- From: "Junior + Suporte" <[EMAIL PROTECTED]> To: "'Post all your questions about iText here'" <[email protected]> Sent: Monday, July 24, 2006 2:46 PM Subject: [iText-questions] RES: Digital Signature >I following this example: > http://article.gmane.org/gmane.comp.windows.dotnet.itextsharp.general/12 > > I export the X509Certificate2 to byte[] and import into a PKCS12Store > object, with MemoryStream, and into a bouncycastles X509Certificate > object: > > <CODE> > cert = new > org.bouncycastle.x509.X509Certificate(Certificado.Export(X509ContentType.Cer > t)); > PKCS12Store p12 = new PKCS12Store(new > MemoryStream(Certificado.Export(X509ContentType.Pkcs12)), > "".ToCharArray()); > string alias = p12.getCertificateAlias(cert); > </CODE> > > The string alias is null, the sign function finally successfully, but the > output pdf have 0kb. > > Luiz Carlos Zancanella Junior > > -----Mensagem original----- > De: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Em nome de Paulo > Soares > Enviada em: domingo, 23 de julho de 2006 18:50 > Para: Post all your questions about iText here > Assunto: Re: [iText-questions] Digital Signature > > You get your X509Certificate2, export it to a byte array and create a new > bouncycastle certificate with it. > > Paulo > > ----- Original Message ----- > From: "Junior + Suporte" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; > <[email protected]> > Sent: Sunday, July 23, 2006 7:54 PM > Subject: [iText-questions] Digital Signature > > >> Hi all, >> >> I'm trying to Sign a PDF with iTextSharp, I have found a lot of example >> in >> the internet, but all talks about digital sign with a PFX file, I want to >> sign a PDF with an certificate stored in the Microsoft Store (my). C# >> have > >> a >> function to get the certificates from My, but this function return a >> certificate in X509Certificate2 object, and this type is not accept by >> function CreateSignature(). I want to know if the BouncyCastle have any >> function to get the My certificates, to return the certificate in right >> type >> to be used in CreateSignature(), or if have any way to convert >> X509Certificate2 in a acceptable parameter to be passed in >> CreateSignature(). >> >> Thanks All. >> >> Luiz Carlos Zancanella Junior >> >> > > > ---------------------------------------------------------------------------- > ---- > > >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys -- and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ---------------------------------------------------------------------------- > ---- > > >> _______________________________________________ >> iText-questions mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/itext-questions >> > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
