3

I want to encrypt the body of my SOAP message twice (super encryption). I am using Axis2 with Rampart.

I am trying to change the policy of this scenario to encrypt it twice.

I was looking at this part (no clue if that makes sense):

...
<sp:EncryptedParts>
    <sp:Body/>
</sp:EncryptedParts>
...

I tried:

...
<sp:EncryptedParts>
    <sp:EncryptedParts>
        <sp:Body/>
    </sp:EncryptedParts>
</sp:EncryptedParts>
...

This gave me an error: "Unexpected encrypted data found, no encryption required"

I also tried:

 ...
 <sp:EncryptedParts>        
     <sp:Body/>
     <sp:EncryptedData/>
 </sp:EncryptedParts>
 ...

Does somebody know how to do this? It doesn't even have to be through the policy: I just need this to happen and get accepted by the server for testing purposes.

Thomas
  • 2,070
  • 3
  • 16
  • 21
  • [The specs](http://www.w3.org/TR/xmlenc-core/#sec-eg-Super-Encryption) say: During super-encryption of an EncryptedData or EncryptedKey element, one must encrypt the entire element. – flup Apr 07 '13 at 11:59
  • So I'd expect the soap Body to contain an EncryptedData element which, when decrypted, yields another EncryptedData element. – flup Apr 07 '13 at 12:10
  • @flup Yes, that is correct. But how to make this happen with the policy? – Thomas Apr 08 '13 at 15:07
  • Nothing that I can find in the rampart documentation suggests that this can be done. – flup Apr 08 '13 at 16:09

0 Answers0