Ya solucioné el problema. Era un tema de configuración. Pego mi fichero de conf por si le puede ser útil a alguien:
## ## Author: Pa�l Santapau Nebot ## Date: 15-02-08 ## ## Description: That is a sample conguration file for the uji ## crypto modules, that should be taken as an example ## and must be modified to fit the specific requierements ## of each case. ## ## ##For Certificates a new protocol has been added, this is keystore://Alias # ## ## (XAdES-X-L) Digidoc related stuff ## # DEFAULT_KEYSTORE=uji.keystore DIGIDOC_OCSP_RESPONDER_COUNT=3 DIGIDOC_OCSP_RESPONDER_URL1=http://ocsp.accv.es DIGIDOC_OCSP_RESPONDER_URL2=http://ocsp.dnie.es DIGIDOC_OCSP_RESPONDER_URL3=http://ocsp.camerfirma.com SIGN_OCSP_REQUESTS=false DIGIDOC_USE_NONCE=false DIGIDOC_CA_CERTS=10 DIGIDOC_CA_CERT1=jar://cagva.pem DIGIDOC_CA_CERT2=jar://rootca.pem DIGIDOC_CA_CERT3=jar://accv-ca2.pem DIGIDOC_CA_CERT4=jar://ACDNIE001.pem DIGIDOC_CA_CERT5=jar://ACDNIE002-SHA1.pem DIGIDOC_CA_CERT6=jar://ACDNIE003-SHA1.pem DIGIDOC_CA_CERT7=jar://NisuCa.pem DIGIDOC_CA_CERT8=jar://ujica.pem DIGIDOC_CA_CERT9=jar://fnmt.pem DIGIDOC_CA_CERT10=jar://CACamerfirma.pem DIGIDOC_OCSP_COUNT=4 DIGIDOC_OCSP1_CN=ocsp-gva DIGIDOC_OCSP1_CERT=jar://ocsp-gva.crt DIGIDOC_OCSP1_CA_CERT=jar://cagva.pem DIGIDOC_OCSP1_CA_CN=CAGVA DIGIDOC_OCSP2_CN=AV DNIE FNMT DIGIDOC_OCSP2_CERT=jar://DNIEOCSP.pem DIGIDOC_OCSP2_CA_CERT=jar://ACDNIE001.pem DIGIDOC_OCSP2_CA_CN=AC DNIE 001 DIGIDOC_OCSP3_CN=ocsp-gva DIGIDOC_OCSP3_CERT=jar://ocsp-gva-old.crt DIGIDOC_OCSP3_CA_CERT=jar://cagva.pem DIGIDOC_OCSP3_CA_CN=CAGVA DIGIDOC_OCSP4_CN=OCSP Responder DIGIDOC_OCSP4_CERT=jar://VA-ocspSign.pem DIGIDOC_OCSP4_CA_CERT=jar://VA-root.pem DIGIDOC_OCSP4_CA_CN=Chambers of Commerce Root # OCSP, CRL or none selectors DIGIDOC_CERT_VERIFIER=OCSP DIGIDOC_SIGNATURE_VERIFIER=OCSP #DIGIDOC_CERT_VERIFIER=NONE #DIGIDOC_SIGNATURE_VERIFIER=NONE # Set this value to false if you are not adding an ocsp # confirmation to your signatures, otherwise, an exception # will be thrown if the confirmation does not exists. DIGIDOC_DEMAND_OCSP_CONFIRMATION_ON_VERIFY=true # Set this value to 0 if you do not want # compute the tsp. #DIGIDOC_TSA_COUNT=0 DIGIDOC_TSA_COUNT=2 DIGIDOC_TSA1_CERT=jar://tsa1_accv.der DIGIDOC_TSA1_CA_CERT=jar://tsa1_accv.der DIGIDOC_TSA1_USE_NONCE=true DIGIDOC_TSA1_ASK_CERT=false DIGIDOC_TSA1_URL=http://tss.accv.es:8318/tsa DIGIDOC_TSA1_CN=CAGVA DIGIDOC_TSA1_CA_CN=CAGVA DIGIDOC_TSA1_SN=12 DIGIDOC_MAX_TSA_TIME_ERR_SECS=60 DIGIDOC_TSA2_CERT=jar://Cert-TSU.cer DIGIDOC_TSA2_CA_CERT=jar://Cert-TSU.cer DIGIDOC_TSA2_USE_NONCE=true DIGIDOC_TSA2_ASK_CERT=false DIGIDOC_TSA2_URL=http://tsa.camerfirma.com:15004/TSUSoftware. DIGIDOC_TSA2_CN=TSA Camerfirma SW anonimo DIGIDOC_TSA2_CA_CN=TSA Camerfirma SW anonimo DIGIDOC_TSA2_SN=12 DIGIDOC_MAX_TSA_TIME_ERR_SECS=60 # ## ## Pdf related stuff ## # PDFSIG_REASON=CryptoApplet digital signatures PDFSIG_LOCATION=Spain PDFSIG_CONTACT=Jaume I University PDFSIG_CA_CERTS=10 PDFSIG_CA_CERT1=cagva.pem PDFSIG_CA_CERT2=rootca.pem PDFSIG_CA_CERT3=accv-ca2.pem PDFSIG_CA_CERT4=ACDNIE001.pem PDFSIG_CA_CERT5=ACDNIE002-SHA1.pem PDFSIG_CA_CERT6=ACDNIE003-SHA1.pem PDFSIG_CA_CERT7=NisuCa.pem PDFSIG_CA_CERT8=test.pem PDFSIG_CA_CERT9=fnmt.pem PDFSIG_CA_CERT10=CACamerfirma.pem # #If false, next line will be ignored # PDFSIG_TIMESTAMPING=false PDFSIG_TSA_URL=http://tss.accv.es:8318/tsa # #If false, next line will be ignored # CMS_TIMESTAMPING=true CMS_TSA_URL=http://tss.accv.es:8318/tsa PDFSIG_VISIBLE_SIGNATURE=true PDFSIG_VISIBLE_AREA_X=0 PDFSIG_VISIBLE_AREA_Y=830 PDFSIG_VISIBLE_AREA_X2=110 PDFSIG_VISIBLE_AREA_Y2=785 PDFSIG_VISIBLE_AREA_PAGE=1 PDFSIG_VISIBLE_AREA_IMGFILE=uji.jpg _____ Iván Franco Rabuñal Director de ProyectosProject Manager [email protected] Polígono Industrial A Granxa Paralela 1 (calle D)Edificio de Piedra 36400 O Porriño (Pontevedra) Tel: +34 986342774 Fax:+34 986342298 _____ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener información confidencial, siendo para uso exclusivo del destinatario. Queda prohibida su divulgación copia o distribución a terceros sin la autorización expresa del remitente. Si usted ha recibido este mensaje erróneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboración. This message, and in the case of any file annexed to it, can have confidential information, and it is exclusively for the use of the addressee of the message. It is strictly forbidden to spread a copy or distribute to third parties, without the express order of the sender. If you have received this message mistakenly, we request you to notify to the sender, and please be sure to erase it. Thank you for your collaboration. _____ De: Iván Franco [mailto:[email protected]] Enviado el: viernes, 30 de julio de 2010 13:25 Para: 'Llista de correu per al CryptoApplet' Asunto: error en firma Xades con versión 2.1.0 Buenos días, estoy teniendo un problema a la hora de firmar con firma XADES desde que actualicé a la versión 2.1.0. Con la anterior (2.0.5) funcionaba correctamente. Ahora tengo un error que podría ser por configuración pero la verdad es que me ha sido imposible localizarlo. He probado a realizar la firma con certificados digitales de prueba y con DNI electrónico y el error es el mismo. Además la firma en formato PDF funciona bien, sólo es en la firma XADES. He descargado los fuentes pero no consigo sacar ninguna conclusión. Parece que hay algún problema con los certificados pero no estoy seguro. La traza es la siguiente: DEBUG thread-sig-0 es.uji.security.crypto.openxades.OpenXAdESSignatureFactory [13:05:16,872] - Using XAdESSignatureFactory DEBUG thread-sig-0 es.uji.security.crypto.openxades.OpenXAdESSignatureFactory [13:05:16,872] - UJI-MSCAPI provider found DEBUG thread-sig-0 es.uji.security.crypto.openxades.digidoc.DataFile [13:05:16,942] - calculateFileSizeAndDigest(D0) ASK FOR: DATAFILE_USE_64BYTE_LINESreturn valuenull DEBUG thread-sig-0 es.uji.security.crypto.openxades.digidoc.DataFile [13:05:16,992] - DataFile: 'D0' length: 108032 digest: fHV3dXVIzJn1WgPPwyHtM0Mrgoc= DEBUG thread-sig-0 es.uji.security.crypto.openxades.OpenXAdESSignatureFactory [13:05:35,814] - Signing XAdES info. XAdES signature length 256 ASK FOR: DIGIDOC_TSA1_URLreturn valuehttp://tss.accv.es:8318/tsa ASK FOR: DIGIDOC_TSA1_CA_CERTreturn valuejar://tsa1_accv.der ASK FOR: DIGIDOC_CERT_VERIFIERreturn valueNONE ASK FOR: DIGIDOC_TSA1_URLreturn valuehttp://tss.accv.es:8318/tsa ASK FOR: DIGIDOC_TSA1_CA_CERTreturn valuejar://tsa1_accv.der ERROR thread-sig-0 es.uji.security.ui.applet.SignatureThread [13:05:36,124] - <html><font color='red'>No se ha podido calcular la firma</font></html> java.lang.NullPointerException at es.uji.security.crypto.openxades.OpenXAdESSignatureFactory.formatSignature(OpenXAdESSignatureFactory.java:280) at es.uji.security.ui.applet.SignatureThread.run(SignatureThread.java:298) DEBUG thread-sig-0 es.uji.security.ui.applet.AppHandler [13:05:36,134] - Call JavaScript method: onSignError es.uji.security.ui.applet.SignatureAppletException at es.uji.security.ui.applet.SignatureThread.run(SignatureThread.java:306) DEBUG AWT-EventQueue-7 es.uji.security.ui.applet.EventActionHandler [13:19:02,894] - OnClose action called DEBUG AWT-EventQueue-7 es.uji.security.ui.applet.EventActionHandler [13:19:02,894] - Invoked funtion: onSignCancel DEBUG AWT-EventQueue-7 es.uji.security.ui.applet.AppHandler [13:19:02,914] - Call JavaScript method: onSignCancel Gracias. _____ Iván Franco Rabuñal Director de ProyectosProject Manager [email protected] Polígono Industrial A Granxa Paralela 1 (calle D)Edificio de Piedra 36400 O Porriño (Pontevedra) Tel: +34 986342774 Fax:+34 986342298 _____ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener información confidencial, siendo para uso exclusivo del destinatario. Queda prohibida su divulgación copia o distribución a terceros sin la autorización expresa del remitente. Si usted ha recibido este mensaje erróneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboración. This message, and in the case of any file annexed to it, can have confidential information, and it is exclusively for the use of the addressee of the message. It is strictly forbidden to spread a copy or distribute to third parties, without the express order of the sender. If you have received this message mistakenly, we request you to notify to the sender, and please be sure to erase it. Thank you for your collaboration. _____
<<image001.gif>>
<<image002.gif>>
_______________________________________________ CryptoApplet mailing list [email protected] http://llistes.uji.es/mailman/listinfo/cryptoapplet
