Rodrigo Neves created RAMPART-410:
-------------------------------------

             Summary: SymmetricBinding policy with EncryptionToken and 
SignatureToken defined
                 Key: RAMPART-410
                 URL: https://issues.apache.org/jira/browse/RAMPART-410
             Project: Rampart
          Issue Type: Bug
          Components: rampart-core
    Affects Versions: 1.6.2
            Reporter: Rodrigo Neves


When trying to use a SymmetricBinding policy with EncryptionToken and 
SignatureToken defined in policy.xml file, the following exception is thrown by 
rampart: 
"Caused by: org.apache.ws.secpolicy.WSSPolicyException: Symmetric binding 
should have a Protection token or both Signature and Encryption tokens defined"

In method "symmetricBinding" of class "RampartPolicyBuilder.java" of 
rampart-core, there is the following if statement:

            Assertion encrToken = binding.getEncryptionToken();
            Assertion sigToken = binding.getSignatureToken();
            if (token == null && sigToken == null) {
                throw new WSSPolicyException("Symmetric binding should have a 
Protection token or" +
                                                " both Signature and Encryption 
tokens defined");
            }

The if statement should be "if(encrToken == null && sigToken == null)".

Is it possible to solve this issue in order to avoid this invalid exception?

Thanks.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to