ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [ws-wss4j] 04/04: Picking up some changes from SANTUARIO-536
Date Thu, 16 Apr 2020 11:25:08 GMT
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git

commit 507c7a00dd31cca286d0d3d7451cb7da068f926a
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Thu Apr 16 12:24:32 2020 +0100

    Picking up some changes from SANTUARIO-536
---
 .../src/main/java/org/apache/wss4j/stax/ext/WSSSecurePart.java    | 6 +++++-
 .../wss4j/stax/impl/processor/output/EncryptOutputProcessor.java  | 4 ++--
 .../stax/impl/processor/output/SAMLTokenOutputProcessor.java      | 4 ++--
 .../stax/impl/processor/output/SecurityHeaderOutputProcessor.java | 8 ++++----
 .../stax/impl/processor/output/WSSSignatureOutputProcessor.java   | 4 ++--
 5 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSSecurePart.java b/ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSSecurePart.java
index 4d5e4b2..102c134 100644
--- a/ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSSecurePart.java
+++ b/ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSSecurePart.java
@@ -29,6 +29,10 @@ public class WSSSecurePart extends SecurePart {
 
     private String idToReference;
 
+    public WSSSecurePart(Modifier modifier) {
+        super(modifier);
+    }
+
     public WSSSecurePart(QName name, Modifier modifier) {
         super(name, modifier);
     }
@@ -64,4 +68,4 @@ public class WSSSecurePart extends SecurePart {
     public void setIdToReference(String idToReference) {
         this.idToReference = idToReference;
     }
-}
\ No newline at end of file
+}
diff --git a/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
b/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
index 5f2baa1..6bff9a6 100644
--- a/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
+++ b/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
@@ -110,10 +110,10 @@ public class EncryptOutputProcessor extends AbstractEncryptOutputProcessor
{
                         outputProcessorChain.getSecurityContext().getAsMap(WSSConstants.SIGNATURE_PARTS);
                     if (dynamicSecureParts != null && securePart.getName() != null
                         && securePart.equals(dynamicSecureParts.get(securePart.getName())))
{
-                        securePart.setIdToSign(encryptionPartDef.getEncRefId());
+                        securePart.setIdToSecure(encryptionPartDef.getEncRefId());
                         outputProcessorChain.getSecurityContext().putAsMap(
                             WSSConstants.SIGNATURE_PARTS,
-                            securePart.getIdToSign(),
+                            securePart.getIdToSecure(),
                             securePart
                         );
                     }
diff --git a/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
b/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
index 6e22962..f500ad5 100644
--- a/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
+++ b/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
@@ -186,7 +186,7 @@ public class SAMLTokenOutputProcessor extends AbstractOutputProcessor
{
                     securityProperties.getSignatureSecureParts().iterator();
                 while (signaturePartsIterator.hasNext()) {
                     SecurePart securePart = signaturePartsIterator.next();
-                    if (samlAssertionWrapper.getId().equals(securePart.getIdToSign())
+                    if (samlAssertionWrapper.getId().equals(securePart.getIdToSecure())
                         || assertionName.equals(securePart.getName())) {
                         includeSTR = true;
                         signaturePartsIterator.remove();
@@ -214,7 +214,7 @@ public class SAMLTokenOutputProcessor extends AbstractOutputProcessor
{
                 WSSSecurePart securePart =
                         new WSSSecurePart(
                                 new QName(WSSConstants.SOAPMESSAGE_NS10_STR_TRANSFORM), SecurePart.Modifier.Element);
-                securePart.setIdToSign(tokenId);
+                securePart.setIdToSecure(tokenId);
                 securePart.setIdToReference(securityTokenReferenceId);
                 outputProcessorChain.getSecurityContext().putAsMap(WSSConstants.SIGNATURE_PARTS,
tokenId, securePart);
             }
diff --git a/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SecurityHeaderOutputProcessor.java
b/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SecurityHeaderOutputProcessor.java
index d589d83..546fe50 100644
--- a/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SecurityHeaderOutputProcessor.java
+++ b/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SecurityHeaderOutputProcessor.java
@@ -70,7 +70,7 @@ public class SecurityHeaderOutputProcessor extends AbstractOutputProcessor
{
                             // Check to see if the wrong SOAP NS was used
                             changeSOAPNamespace(securePart, soapMessageVersion);
 
-                            if (securePart.getIdToSign() == null) {
+                            if (securePart.getIdToSecure() == null) {
                                 outputProcessorChain.getSecurityContext().putAsMap(
                                         WSSConstants.ENCRYPTION_PARTS,
                                         securePart.getName(),
@@ -79,7 +79,7 @@ public class SecurityHeaderOutputProcessor extends AbstractOutputProcessor
{
                             } else {
                                 outputProcessorChain.getSecurityContext().putAsMap(
                                         WSSConstants.ENCRYPTION_PARTS,
-                                        securePart.getIdToSign(),
+                                        securePart.getIdToSecure(),
                                         securePart
                                 );
                             }
@@ -91,7 +91,7 @@ public class SecurityHeaderOutputProcessor extends AbstractOutputProcessor
{
                             // Check to see if the wrong SOAP NS was used
                             changeSOAPNamespace(securePart, soapMessageVersion);
 
-                            if (securePart.getIdToSign() == null) {
+                            if (securePart.getIdToSecure() == null) {
                                 outputProcessorChain.getSecurityContext().putAsMap(
                                         WSSConstants.SIGNATURE_PARTS,
                                         securePart.getName(),
@@ -100,7 +100,7 @@ public class SecurityHeaderOutputProcessor extends AbstractOutputProcessor
{
                             } else {
                                 outputProcessorChain.getSecurityContext().putAsMap(
                                         WSSConstants.SIGNATURE_PARTS,
-                                        securePart.getIdToSign(),
+                                        securePart.getIdToSecure(),
                                         securePart
                                 );
                             }
diff --git a/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/WSSSignatureOutputProcessor.java
b/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/WSSSignatureOutputProcessor.java
index 53420d3..ffd3839 100644
--- a/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/WSSSignatureOutputProcessor.java
+++ b/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/WSSSignatureOutputProcessor.java
@@ -98,7 +98,7 @@ public class WSSSignatureOutputProcessor extends AbstractSignatureOutputProcesso
                         signaturePartDef.setDigestAlgo(getSecurityProperties().getSignatureDigestAlgorithm());
                     }
 
-                    if (securePart.getIdToSign() == null) {
+                    if (securePart.getIdToSecure() == null) {
                         signaturePartDef.setGenerateXPointer(securePart.isGenerateXPointer());
                         signaturePartDef.setSigRefId(IDGenerator.generateID(null));
 
@@ -121,7 +121,7 @@ public class WSSSignatureOutputProcessor extends AbstractSignatureOutputProcesso
                             };
                             signaturePartDef.setTransforms(transforms);
                         } else {
-                            signaturePartDef.setSigRefId(securePart.getIdToSign());
+                            signaturePartDef.setSigRefId(securePart.getIdToSecure());
                         }
                     }
 


Mime
View raw message