Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[higgins-dev] [XDI4J] - Signing a XDI message

Hi,

freexri.com issued a certificate associated with my i-name and i got a private key to sign messages and grant authenticity;
but i'm having a hard time trying to sign xdi message envelopes.
Here's a snippet of my code:

final String strKey = "MIIEvwIBADANB...."
[...]
DerValue dv = new DerValue(strKey);
envelope.sign(PKCS8Key.parseKey(dv)); 


it throws the following error:

Exception in thread "main" java.io.IOException: corrupt private key
at sun.security.pkcs.PKCS8Key.parseKey(PKCS8Key.java:104)


Can you give me some hints, example on how to sign it?

Best regards,
Nuno R.

Back to the top