You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by "kapil.gupta@fiserv.com" <ka...@fiserv.com> on 2010/11/09 13:01:11 UTC
Re: XMLSignature.sign() NullPointerException
Hi Sean,
I am also facing this problem.
I have also explicitly specify the provider like this:-
signContext.setProperty
("org.jcp.xml.dsig.internal.dom.SignatureProvider", new
au.com.eracom.crypto.provider.slot0.ERACOMProvider());
but i am still getting the error.
can you please provide your input.
sean.mullan wrote:
>
> There are some use cases where using an unextractable private key results
> in
> errors like this. See
> https://issues.apache.org/bugzilla/show_bug.cgi?id=43056
> for more info.
>
> If this is the case, you must explicitly specify the
> java.security.Signature
> Provider that works with your Safenet HSM by setting a property on the
> XMLSignContext object, ex:
>
> signContext.setProperty
> ("org.jcp.xml.dsig.internal.dom.SignatureProvider", new
> MyProvider());
>
> --Sean
>
> Dennis wrote:
>> Hi,
>>
>> I am using the Apache XML Digital Signature RI to sign SAML 2.0 messages
>> and
>> using a Safenet HSM. My code looks OK until it gets to the point of
>> signing
>> when I get a null pointer exception.
>>
>>
>> 08/11/06 14:20:03 java.lang.NullPointerException
>> 08/11/06 14:20:03 at
>> com.sun.net.ssl.internal.ssl.JS_ConvertBigInteger.toByteArray(DashoA12275)
>> 08/11/06 14:20:03 at
>> com.sun.net.ssl.internal.ssl.JSA_RSAKeyFactory.engineTranslateKey(DashoA12275)
>> 08/11/06 14:20:03 at java.security.KeyFactory.translateKey
>> (KeyFactory.java:277)
>> 08/11/06 14:20:03 at
>> com.sun.net.ssl.internal.ssl.JS_Signature.engineInitSign(DashoA12275)
>> 08/11/06 14:20:03 at
>> java.security.Signature$Delegate.engineInitSign
>> (Signature.java:772)
>> 08/11/06 14:20:03 at
>> java.security.Signature.initSign(Signature.java:356)
>> 08/11/06 14:20:03 at
>> org.jcp.xml.dsig.internal.dom.DOMSignatureMethod.sign(Unknown Source)
>> 08/11/06 14:20:03 at
>> org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign
>> (Unknown Source)
>>
>> Has anyone seen a similar error ?
>>
>> regards
>> Dennis
>>
>
>
>
--
View this message in context: http://old.nabble.com/XMLSignature.sign%28%29--NullPointerException-tp20365564p30170109.html
Sent from the Apache XML - Security - Dev mailing list archive at Nabble.com.