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
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
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
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
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
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-10-01       - By Leonard Rosenthol

 Back
I opened this PDF up in Acrobat 8.1 and it says that the document  
hasn't been modified since it was signed, but the signature's  
validity is unknown - which is correct since I don't have this sig in  
my keystore.

What am I missing?


Leonard

On Sep 30, 2007, at 1:30 PM, Xavier Le Vourch wrote:

> -- --BEGIN PGP SIGNED MESSAGE-- --
> Hash: SHA1
>
> Hi,
>
> I've got the same problem with the timestamping code but in fact,  
> while
> trying to get a small example together, I've found that the same error
> occurs also with just the signing part.
>
> The signing code is based on the doc to sign doc at:
>
>   http://itextpdf.sourceforge.net/howtosign.html#howtosign
>
>
> The two pdf files are attached.
>
> The Java code consists of:
>
> =========
> com.lowagie.text.Document.compress = false;
> KeyStore ks = KeyStore.getInstance("pkcs12");
> ks.load(new FileInputStream(KEYSTORE), PASSWORD.toCharArray());
> String alias = (String)ks.aliases().nextElement();
> PrivateKey key = (PrivateKey)ks.getKey(alias, PASSWORD.toCharArray());
> Certificate[] chain = ks.getCertificateChain(alias);
> PdfReader reader = new PdfReader(IN);
> FileOutputStream fout = new FileOutputStream(OUT);
> PdfStamper stp = PdfStamper.createSignature(reader, fout, '\0');
> PdfSignatureAppearance sap = stp.getSignatureAppearance();
> sap.setCrypto(key, chain, null, PdfSignatureAppearance.WINCER_SIGNED);
> sap.setReason(REASON);
> sap.setLocation(LOCATION);
> // comment next line to have an invisible signature
> sap.setVisibleSignature(new Rectangle(100, 100, 200, 200), 1, null);
> stp.close();
> =========
>
>


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

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