Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
RES: Digital Signature

RES: Digital Signature

2006-07-24       - By Junior + Suporte

 Back
Reply:     1     2  

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: itext-questions-bounces@(protected)
[mailto:itext-questions-bounces@(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" <junior@(protected)>
To: <itext-questions-request@(protected)>;
<itext-questions@(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
> iText-questions@(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
iText-questions@(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
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions

©2008 junlu.com - Jax Systems, LLC, U.S.A.