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
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