Encrypt/Decrypt SOAP Attachment with XWSS problem.

Discussion in 'Java' started by cencio1980, Jan 29, 2008.

  1. cencio1980

    cencio1980 Guest

    Hi all,

    I'm trying to encrypt/decrypt a soap message with attachments with
    xwss.

    I try doing it to the soap:body and it works.

    If i try to do also to attachments i have some problems.

    Encrypt works, but when i decrypt it gives me an exception..
    It first call
    com.sun.xml.wss.impl.callback.SignatureKeyCallback
    $DefaultPrivKeyCertRequest
    then
    com.sun.xml.wss.impl.callback.DecryptionKeyCallback
    $X509CertificateBasedRequest

    and both find the keys but it gives

    com.sun.xml.wss.XWSSecurityException:
    com.sun.xml.wss.XWSSecurityException: Symmetric Key is null
    at
    com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.verifyInboundMessage(XWSSProcessor2_0Impl.java:
    146)
    at
    org.openspcoop.pdd.services.RicezioneContenutiApplicativiWS.invoke(RicezioneContenutiApplicativiWS.java:
    82)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    .....
    .....
    Caused by: com.sun.xml.wss.XWSSecurityException: Symmetric Key is null
    at
    com.sun.xml.wss.impl.apachecrypto.DecryptionProcessor.processEncryptedData(DecryptionProcessor.java:
    514)
    at
    com.sun.xml.wss.impl.apachecrypto.DecryptionProcessor.processEncryptedData(DecryptionProcessor.java:
    468)
    at
    com.sun.xml.wss.impl.apachecrypto.DecryptionProcessor.decrypt(DecryptionProcessor.java:
    150)



    If i try to encrypt only attachments it calls only
    com.sun.xml.wss.impl.callback.SignatureKeyCallback
    $DefaultPrivKeyCertRequest
    then raise the same exception.

    This is the config:



    <xwss:SecurityConfiguration dumpMessages="false"
    xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
    <xwss:Encrypt>
    <xwss:X509Token certificateAlias="pa" />
    <xwss:Target type="qname"> {http://schemas.xmlsoap.org/soap/
    envelope/}Body</xwss:Target>
    <xwss:Target type="uri">cid:*</xwss:Target>
    </xwss:Encrypt>
    </xwss:SecurityConfiguration>



    Any suggestion?

    Thx!
    /Lorenzo
     
    cencio1980, Jan 29, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    3,075
    srisha
    Aug 30, 2007
  2. Sherwood

    FormsAuthentication Encrypt/Decrypt Problem/Issue

    Sherwood, Jan 22, 2005, in forum: ASP .Net Security
    Replies:
    0
    Views:
    295
    Sherwood
    Jan 22, 2005
  3. Phil C.
    Replies:
    0
    Views:
    345
    Phil C.
    Aug 2, 2005
  4. keith

    Encrypt/Decrypt SOAP message by X.509 Certificate

    keith, Nov 26, 2008, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    1,320
    Gustavo Arellano
    Dec 15, 2008
  5. Replies:
    1
    Views:
    460
    Daniel Martin
    Jun 16, 2007
Loading...

Share This Page