Encrypt/Decrypt SOAP Attachment with XWSS problem.

C

cencio1980

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top