Forum Discussion

stefanovdimitar's avatar
14 years ago

problem signing with hmac-sha1

Can you help me to configure singing with http://www.w3.org/2000/09/xmldsig#hmac-sha1?

I'm trying to invoke a Web Service with is in Oracle OSB with oracle/wss11_username_token_with_message_protection_service_policy policy attached and part of this policy is that the message have to be sighed with hmac-sha1 algorithm.


The problem is that in SoupUI I get
Caused by: org.apache.xml.security.signature.XMLSignatureException: Sorry, you supplied the wrong key type for this operation! You supplied a sun.security.rsa.RSAPrivateCrtKeyImpl but a javax.crypto.SecretKey is needed.
when I try to make a request.

Do I need some special key? How do I setup this?

  • gabcar's avatar
    gabcar
    Occasional Contributor
    Hi,

    I have the same problem.
    I use soapUI 4.5.0.
    I have a clientstore file .jks with: client(private+public) keys and public key of server.
    When i try to use Signature Algorithm: #hmac-sha1, i have the followin error:
    java.security.InvalidKeyException: key must be SecretKey.

    The problem is not related with key or .jks file, because i can use inside a jdeveloper/java solution based in:
    package weblogic.wsee.jws.jaxws.owsm;extends weblogic.wsee.jws.jaxws.owsm.BasePolicyFeature.

    Did you already solve your problem?

    Best Regards