You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by jeffmo <je...@rtr.com> on 2010/11/18 10:22:12 UTC

Problem with CryptoFactory

I have an issue with CryptoFactory that makes me think that I must be using
it incorrectly.


If I have the following code segment, everything works fine:

   Crypto creds = CryptoFactory.getInstance("my.info.p12");

But if I repeat the call to CryptoFactory, like this:

   Crypto creds = CryptoFactory.getInstance("my.info.p12");
   creds = CryptoFactory.getInstance("my.info.p12");

I get either an "Illegal Key Length" exception at the second call.

If I've installed the US unlimited key length jar files from Sun
(local_policy.jar and US_export_policy.jar), then I get a "General security
error (No certificates for user 1 were found for signature)" when I go to
sign the envelope.

To repeat, if I remove the second call to CryptoFactory, everything works
fine.

Any suggestions about what I might be doing wrong?

Thanks!
             Jeff


-- 
View this message in context: http://old.nabble.com/Problem-with-CryptoFactory-tp30239748p30239748.html
Sent from the WSS4J mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Re: Problem with CryptoFactory

Posted by Colm O hEigeartaigh <co...@apache.org>.
I've no idea. Could you supply a test-case?

Colm.

On Thu, Nov 18, 2010 at 9:22 AM, jeffmo <je...@rtr.com> wrote:
>
> I have an issue with CryptoFactory that makes me think that I must be using
> it incorrectly.
>
>
> If I have the following code segment, everything works fine:
>
>   Crypto creds = CryptoFactory.getInstance("my.info.p12");
>
> But if I repeat the call to CryptoFactory, like this:
>
>   Crypto creds = CryptoFactory.getInstance("my.info.p12");
>   creds = CryptoFactory.getInstance("my.info.p12");
>
> I get either an "Illegal Key Length" exception at the second call.
>
> If I've installed the US unlimited key length jar files from Sun
> (local_policy.jar and US_export_policy.jar), then I get a "General security
> error (No certificates for user 1 were found for signature)" when I go to
> sign the envelope.
>
> To repeat, if I remove the second call to CryptoFactory, everything works
> fine.
>
> Any suggestions about what I might be doing wrong?
>
> Thanks!
>             Jeff
>
>
> --
> View this message in context: http://old.nabble.com/Problem-with-CryptoFactory-tp30239748p30239748.html
> Sent from the WSS4J mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: dev-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org