Hi All,
I am trying to implement Digital Signature to sign a pdf document using
iText and I like the digital signature be certified by
https://www.cacert.org/. I have done the following steps so far:

1) created a keystore using the following command
keytool -genkey -alias signer1 -keyalg RSA -keystore signer1.keystore 

2) Created a client certificate from the https://www.cacert.org using my
email address and imported into the keystore created in the previous step by
the following command:
keytool -import -trustcacerts -alias cacert -keystore signer1.keystore -file
signer1_cacert.cer
For better readability I am attaching the contents of the keystore in
keystore.txt that I have got using the following command:
keytool -list -v -keystore signer1.keystore

http://itext-general.2136553.n4.nabble.com/file/n3304828/keystore.txt
keystore.txt 
  
3) My signing code is in the sign.jsp file.
http://itext-general.2136553.n4.nabble.com/file/n3304828/sign.jsp sign.jsp 

4) Got the Root Certificate (DER Format) from CAcert.org and imported into
the Adobe Reader as follows:
Document > Managed Trusted Identities > Add Contacts.. > Browse
cacert_root.cer.>Trust
Now, without cacert certificate my programs rums without any error but with
the cacert certificate I get the following error:
HTTP Status 500 - 
________________________________________
type Exception report
message 
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception 
org.apache.jasper.JasperException: java.lang.NullPointerException

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause 
java.lang.NullPointerException

com.itextpdf.text.pdf.PdfSignatureAppearance.getAppearance(PdfSignatureAppearance.java:409)

com.itextpdf.text.pdf.PdfSignatureAppearance.preClose(PdfSignatureAppearance.java:936)

com.itextpdf.text.pdf.PdfSignatureAppearance.preClose(PdfSignatureAppearance.java:897)
        com.itextpdf.text.pdf.PdfStamper.close(PdfStamper.java:192)
        org.apache.jsp.secured.sign_jsp._jspService(sign_jsp.java:134)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.18 logs.
________________________________________
Apache Tomcat/6.0.18
 
Waiting to receive your helpful comments. Thanks in advance.  


-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Certifying-Digital-Signature-By-CAcert-org-tp3304828p3304828.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Reply via email to