You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by atul <te...@yahoo.com> on 2004/03/01 19:27:35 UTC

using wss4j

Hi,
I am having problems getting wss4j to work with tomcat
with axis(included in existing webapp).
I put wss4j.jar in \lib directory; changed properties
in crypto.properties; bc-jce-jdk13-114.jar (bouncy
castle) in \lib;
I am getting an exception :
        {http://xml.apache.org/axis/}stackTrace:
java.lang.RuntimeException: org.apache.
ws.security.components.crypto.Merlin cannot create
instance
        at
org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactor
y.java:128)
        at
org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFact
ory.java:101)
        at
org.apache.ws.axis.security.WSDoAllSender.loadSignatureCrypto(WSDoAllSender.j
ava:380)
        at
org.apache.ws.axis.security.WSDoAllSender.decodeSignatureParameter(WSDoAllSen
der.java:434)
        at
org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:201)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:7
1)


What am I missing? Does it have a classpath problems
when dynamically trying to load the crypto?

any pointers appreciated



__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

NativeJCE / WSS4J

Posted by Davanum Srinivas <di...@yahoo.com>.
Werner,

Background: There is a thread on the xml-security dev mailing list
(http://thread.gmane.org/gmane.text.xml.security.devel/2224) about speeding up xmlenc and xmldsig
using a Custom JCE Implementation (JNI wrapper around OpenSSL). Code is currently at
http://cvs.internet2.edu/cgi-bin/viewcvs.cgi/NativeJCE/. I can replicate the significant gains in
the test cases and would like to look at it seriously (maybe get them to donate it to Apache?)

Question: They currently support MessageDigest's using MD5+SHA, Signature's using SHA1withRSA and
Cipher's using RSA. Can you please review our current implementation and latest specs to come up
with a list of items that we'll need implemented in NativeJCE?

Thanks,
dims

=====
Davanum Srinivas - http://webservices.apache.org/~dims/

Re: using wss4j

Posted by Rami Jaamour <rj...@parasoft.com>.
Hello,

I was having the same problem and the fix solved it.  However, another 
problem was introduced in today's sources. 

I have the signature verification code:

// BEGIN CODE
WSSecurityEngine secEngine = new WSSecurityEngine();
Crypto crypto = CryptoFactory.getInstance();
// doc is the SOAP Envelope
WSSecurityEngineResult result = secEngine.processSecurityHeader(doc, 
null, null, crypto);
// END CODE

This worked fine with Friday's sources but now processSecurityHeader() 
always returns null and no exceptions are thrown on invalid 
signatures/certificates at all!  I retrieved Friday's sources of WSS4J 
and it worked again without changing my code.  I attached a validly 
signed SOAP Message that I was using in case it helps. Try altering the 
signed content and it will still return null with no exceptions.

Thank you,

Rami Jaamour
Software Engineer
SOAPtest <http://www.parasoft.com/jsp/products/home.jsp?product=SOAP> 
Development
Parasoft Corporation <http://www.parasoft.com>


atul wrote:

>resolved; needed absolute path for file.
>
>--- atul <te...@yahoo.com> wrote:
>  
>
>>Hi,
>>I am having problems getting wss4j to work with
>>tomcat
>>with axis(included in existing webapp).
>>I put wss4j.jar in \lib directory; changed
>>properties
>>in crypto.properties; bc-jce-jdk13-114.jar (bouncy
>>castle) in \lib;
>>I am getting an exception :
>>        {http://xml.apache.org/axis/}stackTrace:
>>java.lang.RuntimeException: org.apache.
>>ws.security.components.crypto.Merlin cannot create
>>instance
>>        at
>>
>>    
>>
>org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactor
>  
>
>>y.java:128)
>>        at
>>
>>    
>>
>org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFact
>  
>
>>ory.java:101)
>>        at
>>
>>    
>>
>org.apache.ws.axis.security.WSDoAllSender.loadSignatureCrypto(WSDoAllSender.j
>  
>
>>ava:380)
>>        at
>>
>>    
>>
>org.apache.ws.axis.security.WSDoAllSender.decodeSignatureParameter(WSDoAllSen
>  
>
>>der.java:434)
>>        at
>>
>>    
>>
>org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:201)
>  
>
>>        at
>>
>>    
>>
>org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:7
>  
>
>>1)
>>
>>
>>What am I missing? Does it have a classpath problems
>>when dynamically trying to load the crypto?
>>
>>any pointers appreciated
>>
>>
>>
>>__________________________________
>>Do you Yahoo!?
>>Get better spam protection with Yahoo! Mail.
>>http://antispam.yahoo.com/tools
>>    
>>
>
>
>__________________________________
>Do you Yahoo!?
>Get better spam protection with Yahoo! Mail.
>http://antispam.yahoo.com/tools
>
>  
>

Re: using wss4j

Posted by atul <te...@yahoo.com>.
resolved; needed absolute path for file.

--- atul <te...@yahoo.com> wrote:
> Hi,
> I am having problems getting wss4j to work with
> tomcat
> with axis(included in existing webapp).
> I put wss4j.jar in \lib directory; changed
> properties
> in crypto.properties; bc-jce-jdk13-114.jar (bouncy
> castle) in \lib;
> I am getting an exception :
>         {http://xml.apache.org/axis/}stackTrace:
> java.lang.RuntimeException: org.apache.
> ws.security.components.crypto.Merlin cannot create
> instance
>         at
>
org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactor
> y.java:128)
>         at
>
org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFact
> ory.java:101)
>         at
>
org.apache.ws.axis.security.WSDoAllSender.loadSignatureCrypto(WSDoAllSender.j
> ava:380)
>         at
>
org.apache.ws.axis.security.WSDoAllSender.decodeSignatureParameter(WSDoAllSen
> der.java:434)
>         at
>
org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:201)
>         at
>
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:7
> 1)
> 
> 
> What am I missing? Does it have a classpath problems
> when dynamically trying to load the crypto?
> 
> any pointers appreciated
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Get better spam protection with Yahoo! Mail.
> http://antispam.yahoo.com/tools


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools