You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by na...@apache.org on 2008/01/28 10:07:15 UTC
svn commit: r615775 -
/webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/builder/SymmetricBindingBuilder.java
Author: nandana
Date: Mon Jan 28 01:07:13 2008
New Revision: 615775
URL: http://svn.apache.org/viewvc?rev=615775&view=rev
Log:
rampart-policy related changes to support WS Security Policy 1.2
Modified:
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/builder/SymmetricBindingBuilder.java
Modified: webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/builder/SymmetricBindingBuilder.java
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/builder/SymmetricBindingBuilder.java?rev=615775&r1=615774&r2=615775&view=diff
==============================================================================
--- webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/builder/SymmetricBindingBuilder.java (original)
+++ webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/builder/SymmetricBindingBuilder.java Mon Jan 28 01:07:13 2008
@@ -28,7 +28,7 @@
import org.apache.rampart.RampartMessageData;
import org.apache.rampart.policy.RampartPolicyData;
import org.apache.rampart.util.RampartUtil;
-import org.apache.ws.secpolicy.Constants;
+import org.apache.ws.secpolicy.SPConstants;
import org.apache.ws.secpolicy.model.AlgorithmSuite;
import org.apache.ws.secpolicy.model.IssuedToken;
import org.apache.ws.secpolicy.model.SecureConversationToken;
@@ -84,7 +84,7 @@
}
- if(Constants.ENCRYPT_BEFORE_SIGNING.equals(rpd.getProtectionOrder())) {
+ if(SPConstants.ENCRYPT_BEFORE_SIGNING.equals(rpd.getProtectionOrder())) {
this.doEncryptBeforeSig(rmd);
} else {
this.doSignBeforeEncrypt(rmd);
@@ -162,9 +162,9 @@
WSSecEncrypt encr = null;
Element encrDKTokenElem = null;
- if(Constants.INCLUDE_ALWAYS.equals(encryptionToken.getInclusion()) ||
- Constants.INCLUDE_ONCE.equals(encryptionToken.getInclusion()) ||
- (rmd.isInitiator() && Constants.INCLUDE_ALWAYS_TO_RECIPIENT.equals(encryptionToken.getInclusion()))) {
+ if(SPConstants.INCLUDE_TOEKN_ALWAYS == encryptionToken.getInclusion() ||
+ SPConstants.INCLUDE_TOKEN_ONCE == encryptionToken.getInclusion() ||
+ (rmd.isInitiator() && SPConstants.INCLUDE_TOEKN_ALWAYS_TO_RECIPIENT == encryptionToken.getInclusion())) {
encrTokenElement = RampartUtil.appendChildToSecHeader(rmd, tok.getToken());
attached = true;
} else if(encryptionToken instanceof X509Token && rmd.isInitiator()) {
@@ -416,11 +416,10 @@
sigTok = this.getToken(rmd, sigTokId);
- if(Constants.INCLUDE_ALWAYS.equals(sigToken.getInclusion()) ||
- Constants.INCLUDE_ONCE.equals(sigToken.getInclusion()) ||
+ if(SPConstants.INCLUDE_TOEKN_ALWAYS == sigToken.getInclusion() ||
+ SPConstants.INCLUDE_TOKEN_ONCE == sigToken.getInclusion() ||
(rmd.isInitiator() &&
- Constants.INCLUDE_ALWAYS_TO_RECIPIENT.equals(
- sigToken.getInclusion()))) {
+ SPConstants.INCLUDE_TOEKN_ALWAYS_TO_RECIPIENT == sigToken.getInclusion())) {
sigTokElem = RampartUtil.appendChildToSecHeader(rmd,
sigTok.getToken());
this.setInsertionLocation(sigTokElem);
@@ -504,9 +503,9 @@
encrTokId = rmd.getIssuedEncryptionTokenId();
encrTok = this.getToken(rmd, encrTokId);
- if(Constants.INCLUDE_ALWAYS.equals(encrToken.getInclusion()) ||
- Constants.INCLUDE_ONCE.equals(encrToken.getInclusion()) ||
- (rmd.isInitiator() && Constants.INCLUDE_ALWAYS_TO_RECIPIENT.equals(encrToken.getInclusion()))) {
+ if(SPConstants.INCLUDE_TOEKN_ALWAYS == encrToken.getInclusion() ||
+ SPConstants.INCLUDE_TOKEN_ONCE == encrToken.getInclusion() ||
+ (rmd.isInitiator() && SPConstants.INCLUDE_TOEKN_ALWAYS_TO_RECIPIENT == encrToken.getInclusion())) {
encrTokElem = (Element)encrTok.getToken();
//Add the encrToken element before the sigToken element