Subject: CAcert Code Development list.
List archive
- From: Diogo Piçarra <xpetept AT gmail.com>
- To: cacert-devel AT lists.cacert.org
- Subject: sign XML files with CaCert Client certificates
- Date: Sat, 23 May 2009 16:55:22 +0100
- Authentication-results: lists.cacert.org; dkim=pass (1024-bit key) header.i= AT gmail.com; dkim-asp=none
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=A4jK/0DIAXDmj6WPrQXCxqMlCYh9Pu1Hlhz/7vfJ/8r8SvXKiUk8VwAGaLmwVK/GFQ hiATyCOlVQWEjkRBn5LD1gxJKnkZR2K4uhoX6ELkLMgqcBEg/RSBhvImGehIFTKwvI/8 ObrYufLzQ6Y7lAIeUljA/NhnuZjw+MXzQ+khc=
hi,
I'am need to sign some xml filesand for that i'am using this code:
http://java.sun.com/developer/technicalArticles/xml/dig_signature_api/
with a little change to support p12 keystores:
KeyStore ks = KeyStore.getInstance("PKCS12");
and i'am using CaCert client certificates in the p12 format export from Opera.
But i always get this error:
mas estou a obter o seguinte erro:
"20/Mai/2009 19:05:10 certificados.Main assinar2
SEVERE: null
java.io.IOException: DER input, Integer tag error
at sun.security.util.DerInputStream.getInteger(DerInputStream.java:151)
at
com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:1202)
at java.security.KeyStore.load(KeyStore.java:1185)
at certificados.Main.assinar2(Main.java:150)
at certificados.Main.<init>(Main.java:66)
at certificados.Main.main(Main.java:73)"
From what i read this exception is throwed when the file is on the
wrong format but i
think it isn't.... as it was created by the browser...
I also read that i need JCE(http://java.sun.com/products/jce) to load
the Cacert certificates
but it still doesn't work.
How can i load the CaCert Certificates in Java to i sign the XML files?
Sorry for my bad englidh.
thanks
Diogo
--
http://xpete.pt.to - Página Pessoal
http://www.alphamatrix.org - software opensource e gratuito português
http://mosel.estg.ipleiria.pt - MOSEL - Movimento OpenSource ESTG Leiria
- sign XML files with CaCert Client certificates, Diogo Piçarra, 05/23/2009
- Re: sign XML files with CaCert Client certificates, Michael Tänzer, 05/23/2009
Archive powered by MHonArc 2.6.16.