Propchange: 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/ext/XMLSecurityHeaderHandler.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/DocumentContextImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/DocumentContextImpl.java?rev=1228829&r1=1228828&r2=1228829&view=diff
==============================================================================
--- 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/DocumentContextImpl.java
 (original)
+++ 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/DocumentContextImpl.java
 Sun Jan  8 11:44:13 2012
@@ -19,10 +19,13 @@
 package org.swssf.xmlsec.impl;
 
 import org.swssf.xmlsec.ext.DocumentContext;
+import org.swssf.xmlsec.ext.XMLSecurityConstants;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamConstants;
 import java.util.ArrayList;
+import java.util.Deque;
+import java.util.LinkedList;
 import java.util.List;
 
 /**
@@ -81,48 +84,42 @@ public class DocumentContextImpl impleme
         return getPath().size();
     }
 
-    private int actualEncryptedContentCounter = 0;
-
-    protected int getActualEncryptedContentCounter() {
-        return actualEncryptedContentCounter;
-    }
-
-    protected void setActualEncryptedContentCounter(int 
actualEncryptedContentCounter) {
-        this.actualEncryptedContentCounter = actualEncryptedContentCounter;
-    }
+    Deque<XMLSecurityConstants.ContentType> contentTypeDeque = new 
LinkedList<XMLSecurityConstants.ContentType>();
 
     public synchronized void setIsInEncryptedContent() {
-        this.actualEncryptedContentCounter++;
+        contentTypeDeque.push(XMLSecurityConstants.ContentType.ENCRYPTION);
     }
 
     public synchronized void unsetIsInEncryptedContent() {
-        this.actualEncryptedContentCounter--;
+        if (!contentTypeDeque.isEmpty()) {
+            contentTypeDeque.pop();
+        }
     }
 
     public boolean isInEncryptedContent() {
-        return this.actualEncryptedContentCounter > 0;
+        return 
contentTypeDeque.contains(XMLSecurityConstants.ContentType.ENCRYPTION);
     }
 
-    private int actualSignedContentCounter = 0;
-
-    protected int getActualSignedContentCounter() {
-        return actualSignedContentCounter;
+    public synchronized void setIsInSignedContent() {
+        contentTypeDeque.push(XMLSecurityConstants.ContentType.SIGNATURE);
     }
 
-    protected void setActualSignedContentCounter(int 
actualSignedContentCounter) {
-        this.actualSignedContentCounter = actualSignedContentCounter;
+    public synchronized void unsetIsInSignedContent() {
+        if (!contentTypeDeque.isEmpty()) {
+            contentTypeDeque.pop();
+        }
     }
 
-    public synchronized void setIsInSignedContent() {
-        this.actualSignedContentCounter++;
+    public boolean isInSignedContent() {
+        return 
contentTypeDeque.contains(XMLSecurityConstants.ContentType.SIGNATURE);
     }
 
-    public synchronized void unsetIsInSignedContent() {
-        this.actualSignedContentCounter--;
+    public Deque<XMLSecurityConstants.ContentType> getContentTypeDeque() {
+        return contentTypeDeque;
     }
 
-    public boolean isInSignedContent() {
-        return this.actualSignedContentCounter > 0;
+    protected void setContentTypeDeque(Deque<XMLSecurityConstants.ContentType> 
contentTypeDeque) {
+        this.contentTypeDeque.addAll(contentTypeDeque);
     }
 
     @Override
@@ -133,8 +130,7 @@ public class DocumentContextImpl impleme
         subPath.addAll(this.getPath());
         documentContext.setEncoding(this.encoding);
         documentContext.setPath(subPath);
-        documentContext.actualEncryptedContentCounter = 
this.actualEncryptedContentCounter;
-        documentContext.actualSignedContentCounter = 
this.actualSignedContentCounter;
+        documentContext.setContentTypeDeque(getContentTypeDeque());
         return documentContext;
     }
 }

Modified: 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractDecryptInputProcessor.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractDecryptInputProcessor.java?rev=1228829&r1=1228828&r2=1228829&view=diff
==============================================================================
--- 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractDecryptInputProcessor.java
 (original)
+++ 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractDecryptInputProcessor.java
 Sun Jan  8 11:44:13 2012
@@ -106,6 +106,7 @@ public abstract class AbstractDecryptInp
         return processEvent(inputProcessorChain, false);
     }
 
+    //todo split this methods in smaller ones...
     private XMLEvent processEvent(InputProcessorChain inputProcessorChain, 
boolean isSecurityHeaderEvent) throws XMLStreamException, XMLSecurityException {
 
         if (!tmpXmlEventList.isEmpty()) {
@@ -215,12 +216,6 @@ public abstract class AbstractDecryptInp
                         throw new 
XMLSecurityException(XMLSecurityException.ErrorCode.INVALID_SECURITY, e);
                     }
 
-                    //only fire here ContentEncryptedElementEvents
-                    //the other ones will be fired later, because we don't 
know the encrypted element name yet
-                    if 
(SecurePart.Modifier.Content.getModifier().equals(encryptedDataType.getType())) 
{
-                        encryptedContentEvent(inputProcessorChain, xmlEvent);
-                    }
-
                     KeyInfoType keyInfoType;
                     if (this.keyInfoType != null) {
                         keyInfoType = this.keyInfoType;
@@ -228,14 +223,50 @@ public abstract class AbstractDecryptInp
                         keyInfoType = encryptedDataType.getKeyInfo();
                     }
 
+                    final String algorithmURI = 
encryptedDataType.getEncryptionMethod().getAlgorithm();
+
+                    //retrieve the securityToken which must be used for 
decryption
+                    SecurityToken securityToken = 
SecurityTokenFactory.newInstance().getSecurityToken(
+                            keyInfoType, 
getSecurityProperties().getDecryptionCrypto(),
+                            getSecurityProperties().getCallbackHandler(), 
inputProcessorChain.getSecurityContext(), this);
+
+                    handleSecurityToken(securityToken, 
inputProcessorChain.getSecurityContext(), encryptedDataType);
+                    //only fire here ContentEncryptedElementEvents
+                    //the other ones will be fired later, because we don't 
know the encrypted element name yet
+                    if 
(SecurePart.Modifier.Content.getModifier().equals(encryptedDataType.getType())) 
{
+                        handleEncryptedContent(inputProcessorChain, xmlEvent, 
securityToken);
+                    }
+
+                    Cipher symCipher = null;
+                    try {
+                        AlgorithmType symEncAlgo = 
JCEAlgorithmMapper.getAlgorithmMapping(algorithmURI);
+                        symCipher = 
Cipher.getInstance(symEncAlgo.getJCEName(), symEncAlgo.getJCEProvider());
+                        //we have to defer the initialization of the cipher 
until we can extract the IV...
+                    } catch (NoSuchAlgorithmException e) {
+                        throw new XMLSecurityException(
+                                
XMLSecurityException.ErrorCode.UNSUPPORTED_ALGORITHM, "unsupportedKeyTransp",
+                                e, "No such algorithm: " + algorithmURI
+                        );
+                    } catch (NoSuchPaddingException e) {
+                        throw new XMLSecurityException(
+                                
XMLSecurityException.ErrorCode.UNSUPPORTED_ALGORITHM, "unsupportedKeyTransp",
+                                e, "No such padding: " + algorithmURI
+                        );
+                    } catch (NoSuchProviderException e) {
+                        throw new 
XMLSecurityException(XMLSecurityException.ErrorCode.FAILURE, "noSecProvider", 
e);
+                    }
+
                     //create a new Thread for streaming decryption
-                    DecryptionThread decryptionThread = new 
DecryptionThread(subInputProcessorChain, isSecurityHeaderEvent,
-                            encryptedDataType, keyInfoType, xmlEventNS);
+                    DecryptionThread decryptionThread = new 
DecryptionThread(subInputProcessorChain, isSecurityHeaderEvent, xmlEventNS);
+                    
decryptionThread.setSecretKey(securityToken.getSecretKey(algorithmURI, 
XMLSecurityConstants.Enc));
+                    decryptionThread.setSymmetricCipher(symCipher);
 
                     Thread receiverThread = new Thread(decryptionThread);
                     receiverThread.setName("decrypting thread");
 
-                    AbstractDecryptedEventReaderInputProcessor 
decryptedEventReaderInputProcessor = 
newDecryptedEventReaderInputProccessor(encryptedHeader, 
comparableNamespaceList, comparableAttributeList, encryptedDataType);
+                    AbstractDecryptedEventReaderInputProcessor 
decryptedEventReaderInputProcessor = newDecryptedEventReaderInputProccessor(
+                            encryptedHeader, comparableNamespaceList, 
comparableAttributeList, encryptedDataType, securityToken
+                    );
 
                     //add the new created EventReader processor to the chain.
                     
inputProcessorChain.addProcessor(decryptedEventReaderInputProcessor);
@@ -290,9 +321,13 @@ public abstract class AbstractDecryptInp
 
     protected abstract AbstractDecryptedEventReaderInputProcessor 
newDecryptedEventReaderInputProccessor(
             boolean encryptedHeader, List<ComparableNamespace>[] 
comparableNamespaceList,
-            List<ComparableAttribute>[] comparableAttributeList, 
EncryptedDataType currentEncryptedDataType);
+            List<ComparableAttribute>[] comparableAttributeList, 
EncryptedDataType currentEncryptedDataType, SecurityToken securityToken);
+
+    protected abstract void handleSecurityToken(
+            SecurityToken securityToken, SecurityContext securityContext, 
EncryptedDataType encryptedDataType) throws XMLSecurityException;
 
-    protected abstract void encryptedContentEvent(InputProcessorChain 
inputProcessorChain, XMLEvent xmlEvent) throws XMLSecurityException;
+    protected abstract void handleEncryptedContent(
+            InputProcessorChain inputProcessorChain, XMLEvent xmlEvent, 
SecurityToken securityToken) throws XMLSecurityException;
 
     protected ReferenceType matchesReferenceId(StartElement startElement) {
 
@@ -338,6 +373,7 @@ public abstract class AbstractDecryptInp
         private SecurePart.Modifier encryptionModifier;
         private boolean encryptedHeader = false;
         private int documentLevel = 0;
+        private SecurityToken securityToken;
 
         private boolean rootElementProcessed;
 
@@ -345,13 +381,15 @@ public abstract class AbstractDecryptInp
                 XMLSecurityProperties securityProperties, SecurePart.Modifier 
encryptionModifier,
                 boolean encryptedHeader, List<ComparableNamespace>[] 
namespaceList,
                 List<ComparableAttribute>[] attributeList,
-                AbstractDecryptInputProcessor decryptInputProcessor
+                AbstractDecryptInputProcessor decryptInputProcessor,
+                SecurityToken securityToken
         ) {
             super(securityProperties);
             getAfterProcessors().add(decryptInputProcessor);
             this.encryptionModifier = encryptionModifier;
             rootElementProcessed = encryptionModifier != 
SecurePart.Modifier.Element;
             this.encryptedHeader = encryptedHeader;
+            this.securityToken = securityToken;
             for (int i = 0; i < namespaceList.length; i++) {
                 List<ComparableNamespace> namespaces = namespaceList[i];
                 nsStack.push(namespaces);
@@ -389,7 +427,7 @@ public abstract class AbstractDecryptInp
                 
inputProcessorChain.getDocumentContext().addPathElement(xmlEvent.asStartElement().getName());
 
                 if (!rootElementProcessed) {
-                    encryptedElementEvent(inputProcessorChain, xmlEvent);
+                    handleEncryptedElement(inputProcessorChain, xmlEvent, 
this.securityToken);
                     rootElementProcessed = true;
                 }
 
@@ -447,7 +485,7 @@ public abstract class AbstractDecryptInp
             return xmlEvent;
         }
 
-        protected abstract void encryptedElementEvent(InputProcessorChain 
inputProcessorChain, XMLEvent xmlEvent) throws XMLSecurityException;
+        protected abstract void handleEncryptedElement(InputProcessorChain 
inputProcessorChain, XMLEvent xmlEvent, SecurityToken securityToken) throws 
XMLSecurityException;
 
         private Throwable thrownException;
 
@@ -481,45 +519,12 @@ public abstract class AbstractDecryptInp
         private Key secretKey;
 
         protected DecryptionThread(InputProcessorChain inputProcessorChain, 
boolean header,
-                                   EncryptedDataType encryptedDataType, 
KeyInfoType keyInfoType, XMLEventNS startXMLElement) throws XMLStreamException, 
XMLSecurityException {
+                                   XMLEventNS startXMLElement) throws 
XMLStreamException, XMLSecurityException {
 
             this.inputProcessorChain = inputProcessorChain;
             this.header = header;
             this.startXMLElement = startXMLElement;
 
-            final String algorithmURI = 
encryptedDataType.getEncryptionMethod().getAlgorithm();
-
-            //retrieve the securityToken which must be used for decryption
-            SecurityToken securityToken = 
SecurityTokenFactory.newInstance().getSecurityToken(
-                    keyInfoType, getSecurityProperties().getDecryptionCrypto(),
-                    getSecurityProperties().getCallbackHandler(), 
inputProcessorChain.getSecurityContext(), this);
-
-            setSecretKey(securityToken.getSecretKey(algorithmURI, 
XMLSecurityConstants.Enc));
-
-            try {
-                AlgorithmType syncEncAlgo = 
JCEAlgorithmMapper.getAlgorithmMapping(algorithmURI);
-                
setSymmetricCipher(Cipher.getInstance(syncEncAlgo.getJCEName(), 
syncEncAlgo.getJCEProvider()));
-                //we have to defer the initialization of the cipher until we 
can extract the IV...
-            } catch (NoSuchAlgorithmException e) {
-                throw new XMLSecurityException(
-                        XMLSecurityException.ErrorCode.UNSUPPORTED_ALGORITHM, 
"unsupportedKeyTransp",
-                        e, "No such algorithm: " + algorithmURI
-                );
-            } catch (NoSuchPaddingException e) {
-                throw new XMLSecurityException(
-                        XMLSecurityException.ErrorCode.UNSUPPORTED_ALGORITHM, 
"unsupportedKeyTransp",
-                        e, "No such padding: " + algorithmURI
-                );
-            } catch (NoSuchProviderException e) {
-                throw new 
XMLSecurityException(XMLSecurityException.ErrorCode.FAILURE, "noSecProvider", 
e);
-            }
-
-            //fire an AlgorithmSuiteSecurityEvent
-            /*AlgorithmSuiteSecurityEvent algorithmSuiteSecurityEvent = new 
AlgorithmSuiteSecurityEvent(SecurityEvent.Event.AlgorithmSuite);
-            algorithmSuiteSecurityEvent.setAlgorithmURI(algorithmURI);
-            
algorithmSuiteSecurityEvent.setKeyUsage(XMLSecurityConstants.KeyUsage.Enc);
-            
inputProcessorChain.getSecurityContext().registerSecurityEvent(algorithmSuiteSecurityEvent);*/
-
             //prepare the piped streams and connect them:
             //5 * 8192 seems to be a fine value
             pipedInputStream = new PipedInputStream(40960);

Modified: 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractSignatureInputHandler.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractSignatureInputHandler.java?rev=1228829&r1=1228828&r2=1228829&view=diff
==============================================================================
--- 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractSignatureInputHandler.java
 (original)
+++ 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractSignatureInputHandler.java
 Sun Jan  8 11:44:13 2012
@@ -50,17 +50,23 @@ import java.util.List;
  */
 public abstract class AbstractSignatureInputHandler extends 
AbstractInputSecurityHeaderHandler {
 
-    public AbstractSignatureInputHandler(InputProcessorChain 
inputProcessorChain, XMLSecurityProperties securityProperties, Deque<XMLEvent> 
eventQueue, Integer index) throws XMLSecurityException, XMLStreamException {
+    @Override
+    public void handle(final InputProcessorChain inputProcessorChain, final 
XMLSecurityProperties securityProperties,
+                       Deque<XMLEvent> eventQueue, Integer index) throws 
XMLSecurityException {
 
         @SuppressWarnings("unchecked")
         final SignatureType signatureType = ((JAXBElement<SignatureType>) 
parseStructure(eventQueue, index)).getValue();
-        verifySignedInfo(inputProcessorChain, securityProperties, 
signatureType, eventQueue, index);
-        addSignatureReferenceInputProcessorToChain(inputProcessorChain, 
securityProperties, signatureType);
+        SecurityToken securityToken = verifySignedInfo(inputProcessorChain, 
securityProperties, signatureType, eventQueue, index);
+        addSignatureReferenceInputProcessorToChain(inputProcessorChain, 
securityProperties, signatureType, securityToken);
     }
 
-    protected abstract void 
addSignatureReferenceInputProcessorToChain(InputProcessorChain 
inputProcessorChain, XMLSecurityProperties securityProperties, SignatureType 
signatureType);
-
-    protected void verifySignedInfo(InputProcessorChain inputProcessorChain, 
XMLSecurityProperties securityProperties, SignatureType signatureType, 
Deque<XMLEvent> eventDeque, int index) throws XMLSecurityException, 
XMLStreamException {
+    protected abstract void 
addSignatureReferenceInputProcessorToChain(InputProcessorChain 
inputProcessorChain,
+                                                                       
XMLSecurityProperties securityProperties,
+                                                                       
SignatureType signatureType, SecurityToken securityToken);
+
+    protected SecurityToken verifySignedInfo(InputProcessorChain 
inputProcessorChain, XMLSecurityProperties securityProperties,
+                                             SignatureType signatureType, 
Deque<XMLEvent> eventDeque, int index)
+            throws XMLSecurityException {
         //todo reparse SignedInfo when custom canonicalization method is used
         //verify SignedInfo
         SignatureVerifier signatureVerifier = 
newSignatureVerifier(inputProcessorChain, securityProperties, signatureType);
@@ -73,20 +79,25 @@ public abstract class AbstractSignatureI
             i++;
         }
 
-        boolean verifyElement = false;
-        while (iterator.hasNext()) {
-            XMLEvent xmlEvent = iterator.next();
-            if (xmlEvent.isStartElement() && 
xmlEvent.asStartElement().getName().equals(XMLSecurityConstants.TAG_dsig_SignedInfo))
 {
-                verifyElement = true;
-            } else if (xmlEvent.isEndElement() && 
xmlEvent.asEndElement().getName().equals(XMLSecurityConstants.TAG_dsig_SignedInfo))
 {
-                signatureVerifier.processEvent(xmlEvent);
-                break;
-            }
-            if (verifyElement) {
-                signatureVerifier.processEvent(xmlEvent);
+        try {
+            boolean verifyElement = false;
+            while (iterator.hasNext()) {
+                XMLEvent xmlEvent = iterator.next();
+                if (xmlEvent.isStartElement() && 
xmlEvent.asStartElement().getName().equals(XMLSecurityConstants.TAG_dsig_SignedInfo))
 {
+                    verifyElement = true;
+                } else if (xmlEvent.isEndElement() && 
xmlEvent.asEndElement().getName().equals(XMLSecurityConstants.TAG_dsig_SignedInfo))
 {
+                    signatureVerifier.processEvent(xmlEvent);
+                    break;
+                }
+                if (verifyElement) {
+                    signatureVerifier.processEvent(xmlEvent);
+                }
             }
+        } catch (XMLStreamException e) {
+            throw new 
XMLSecurityException(XMLSecurityException.ErrorCode.FAILED_CHECK, e);
         }
         signatureVerifier.doFinal();
+        return signatureVerifier.getSecurityToken();
     }
 
     protected abstract SignatureVerifier 
newSignatureVerifier(InputProcessorChain inputProcessorChain,
@@ -126,13 +137,16 @@ public abstract class AbstractSignatureI
     </ds:Signature>
      */
 
-    public static class SignatureVerifier {
+    //todo can this class be made abstract somehow?
+    public class SignatureVerifier {
 
         private SignatureType signatureType;
+        private SecurityToken securityToken;
 
         private SignerOutputStream signerOutputStream;
         private OutputStream bufferedSignerOutputStream;
         private Transformer transformer;
+        private XMLSecurityProperties xmlSecurityProperties;
 
         public SignatureVerifier(SignatureType signatureType, SecurityContext 
securityContext,
                                  XMLSecurityProperties securityProperties) 
throws XMLSecurityException {
@@ -145,30 +159,48 @@ public abstract class AbstractSignatureI
             securityToken.verify();
 
             try {
-                createSignatureAlgorithm(securityToken);
+                handleSecurityToken(securityToken);
+                createSignatureAlgorithm(securityToken, signatureType);
             } catch (Exception e) {
                 throw new 
XMLSecurityException(XMLSecurityException.ErrorCode.FAILED_CHECK, e);
             }
+            this.securityToken = securityToken;
+        }
+
+        public SecurityToken getSecurityToken() {
+            return securityToken;
+        }
+
+        protected void handleSecurityToken(SecurityToken securityToken) throws 
XMLSecurityException {
         }
 
-        protected void createSignatureAlgorithm(SecurityToken securityToken) 
throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, 
CertificateException, XMLSecurityException {
+        protected void createSignatureAlgorithm(SecurityToken securityToken, 
SignatureType signatureType)
+                throws NoSuchAlgorithmException, NoSuchProviderException, 
InvalidKeyException,
+                CertificateException, XMLSecurityException {
 
             Key verifyKey;
+            final String algorithmURI = 
signatureType.getSignedInfo().getSignatureMethod().getAlgorithm();
             if (securityToken.isAsymmetric()) {
-                verifyKey = 
securityToken.getPublicKey(XMLSecurityConstants.Asym_Sig);
+                verifyKey = securityToken.getPublicKey(algorithmURI, 
XMLSecurityConstants.Asym_Sig);
             } else {
                 verifyKey = securityToken.getSecretKey(
-                        
signatureType.getSignedInfo().getSignatureMethod().getAlgorithm(), 
XMLSecurityConstants.Sym_Sig);
+                        algorithmURI, XMLSecurityConstants.Sym_Sig);
             }
 
-            SignatureAlgorithm signatureAlgorithm = 
SignatureAlgorithmFactory.getInstance().getSignatureAlgorithm(signatureType.getSignedInfo().getSignatureMethod().getAlgorithm());
+            SignatureAlgorithm signatureAlgorithm =
+                    
SignatureAlgorithmFactory.getInstance().getSignatureAlgorithm(
+                            algorithmURI);
             signatureAlgorithm.engineInitVerify(verifyKey);
             signerOutputStream = new SignerOutputStream(signatureAlgorithm);
             bufferedSignerOutputStream = new 
BufferedOutputStream(signerOutputStream);
 
             try {
                 final CanonicalizationMethodType canonicalizationMethodType = 
signatureType.getSignedInfo().getCanonicalizationMethod();
-                InclusiveNamespaces inclusiveNamespacesType = 
XMLSecurityUtils.getQNameType(canonicalizationMethodType.getContent(), 
XMLSecurityConstants.TAG_c14nExcl_InclusiveNamespaces);
+                InclusiveNamespaces inclusiveNamespacesType =
+                        XMLSecurityUtils.getQNameType(
+                                canonicalizationMethodType.getContent(),
+                                
XMLSecurityConstants.TAG_c14nExcl_InclusiveNamespaces
+                        );
                 List<String> inclusiveNamespaces = inclusiveNamespacesType != 
null ? inclusiveNamespacesType.getPrefixList() : null;
                 transformer = XMLSecurityUtils.getTransformer(
                         inclusiveNamespaces,

Modified: 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java?rev=1228829&r1=1228828&r2=1228829&view=diff
==============================================================================
--- 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
 (original)
+++ 
webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
 Sun Jan  8 11:44:13 2012
@@ -51,11 +51,13 @@ import java.util.List;
 public abstract class AbstractSignatureReferenceVerifyInputProcessor extends 
AbstractInputProcessor {
 
     private SignatureType signatureType;
+    private SecurityToken securityToken;
     private List<ReferenceType> processedReferences = new 
ArrayList<ReferenceType>();
 
-    public AbstractSignatureReferenceVerifyInputProcessor(SignatureType 
signatureType, XMLSecurityProperties securityProperties) {
+    public AbstractSignatureReferenceVerifyInputProcessor(SignatureType 
signatureType, SecurityToken securityToken, XMLSecurityProperties 
securityProperties) {
         super(securityProperties);
         this.signatureType = signatureType;
+        this.securityToken = securityToken;
     }
 
     public SignatureType getSignatureType() {
@@ -66,6 +68,10 @@ public abstract class AbstractSignatureR
         return processedReferences;
     }
 
+    public SecurityToken getSecurityToken() {
+        return securityToken;
+    }
+
     @Override
     public XMLEvent processNextHeaderEvent(InputProcessorChain 
inputProcessorChain) throws XMLStreamException, XMLSecurityException {
         return inputProcessorChain.processHeaderEvent();

Modified: 
webservices/wss4j/branches/swssf/streaming-xml-security/src/test/java/org/swssf/xmlsec/test/InputProcessorChainTest.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-xml-security/src/test/java/org/swssf/xmlsec/test/InputProcessorChainTest.java?rev=1228829&r1=1228828&r2=1228829&view=diff
==============================================================================
--- 
webservices/wss4j/branches/swssf/streaming-xml-security/src/test/java/org/swssf/xmlsec/test/InputProcessorChainTest.java
 (original)
+++ 
webservices/wss4j/branches/swssf/streaming-xml-security/src/test/java/org/swssf/xmlsec/test/InputProcessorChainTest.java
 Sun Jan  8 11:44:13 2012
@@ -18,7 +18,10 @@
  */
 package org.swssf.xmlsec.test;
 
-import org.swssf.xmlsec.ext.*;
+import org.swssf.xmlsec.ext.InputProcessor;
+import org.swssf.xmlsec.ext.InputProcessorChain;
+import org.swssf.xmlsec.ext.XMLSecurityConstants;
+import org.swssf.xmlsec.ext.XMLSecurityException;
 import org.swssf.xmlsec.impl.InputProcessorChainImpl;
 import org.swssf.xmlsec.impl.SecurityContextImpl;
 import org.testng.Assert;

Modified: 
webservices/wss4j/branches/swssf/streaming-xml-security/src/test/java/org/swssf/xmlsec/test/OutputProcessorChainTest.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-xml-security/src/test/java/org/swssf/xmlsec/test/OutputProcessorChainTest.java?rev=1228829&r1=1228828&r2=1228829&view=diff
==============================================================================
--- 
webservices/wss4j/branches/swssf/streaming-xml-security/src/test/java/org/swssf/xmlsec/test/OutputProcessorChainTest.java
 (original)
+++ 
webservices/wss4j/branches/swssf/streaming-xml-security/src/test/java/org/swssf/xmlsec/test/OutputProcessorChainTest.java
 Sun Jan  8 11:44:13 2012
@@ -18,7 +18,10 @@
  */
 package org.swssf.xmlsec.test;
 
-import org.swssf.xmlsec.ext.*;
+import org.swssf.xmlsec.ext.OutputProcessor;
+import org.swssf.xmlsec.ext.OutputProcessorChain;
+import org.swssf.xmlsec.ext.XMLSecurityConstants;
+import org.swssf.xmlsec.ext.XMLSecurityException;
 import org.swssf.xmlsec.impl.OutputProcessorChainImpl;
 import org.swssf.xmlsec.impl.SecurityContextImpl;
 import org.testng.Assert;


Reply via email to