org.apache.xml.security.stax.impl.processor.input
Class AbstractDecryptInputProcessor

java.lang.Object
  extended by org.apache.xml.security.stax.ext.AbstractInputProcessor
      extended by org.apache.xml.security.stax.impl.processor.input.AbstractDecryptInputProcessor
All Implemented Interfaces:
InputProcessor
Direct Known Subclasses:
XMLDecryptInputProcessor

public abstract class AbstractDecryptInputProcessor
extends AbstractInputProcessor

Processor for decryption of EncryptedData XML structures

Version:
$Revision: 1595967 $ $Date: 2014-05-19 18:31:01 +0100 (Mon, 19 May 2014) $
Author:
$Author: giger $

Nested Class Summary
 class AbstractDecryptInputProcessor.AbstractDecryptedEventReaderInputProcessor
          The DecryptedEventReaderInputProcessor reads the decrypted stream with a StAX reader and forwards the generated XMLEvents
 
Field Summary
protected static Integer maximumAllowedEncryptedDataEvents
           
protected static Integer maximumAllowedXMLStructureDepth
           
 
Constructor Summary
AbstractDecryptInputProcessor(org.apache.xml.security.binding.xmldsig.KeyInfoType keyInfoType, org.apache.xml.security.binding.xmlenc.ReferenceList referenceList, XMLSecurityProperties securityProperties)
           
AbstractDecryptInputProcessor(XMLSecurityProperties securityProperties)
           
 
Method Summary
protected  InputStream applyTransforms(org.apache.xml.security.binding.xmlenc.ReferenceType referenceType, InputStream inputStream)
           
 void doFinal(InputProcessorChain inputProcessorChain)
          Will be called when the whole document is processed.
 List<org.apache.xml.security.binding.xmlenc.ReferenceType> getProcessedReferences()
           
 Map<String,org.apache.xml.security.binding.xmlenc.ReferenceType> getReferences()
           
protected abstract  void handleCipherReference(InputProcessorChain inputProcessorChain, org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType, Cipher cipher, InboundSecurityToken inboundSecurityToken)
           
protected abstract  void handleEncryptedContent(InputProcessorChain inputProcessorChain, XMLSecStartElement parentXMLSecStartElement, InboundSecurityToken inboundSecurityToken, org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType)
           
protected abstract  void handleSecurityToken(InboundSecurityToken inboundSecurityToken, InboundSecurityContext inboundSecurityContext, org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType)
           
protected  org.apache.xml.security.binding.xmlenc.ReferenceType matchesReferenceId(XMLSecStartElement xmlSecStartElement)
           
protected abstract  AbstractDecryptInputProcessor.AbstractDecryptedEventReaderInputProcessor newDecryptedEventReaderInputProcessor(boolean encryptedHeader, XMLSecStartElement xmlSecStartElement, org.apache.xml.security.binding.xmlenc.EncryptedDataType currentEncryptedDataType, InboundSecurityToken inboundSecurityToken, InboundSecurityContext inboundSecurityContext)
           
 XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
          Will be called from the framework when the next XMLEvent is requested
 XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
          Will be called from the framework when the next security-header XMLEvent is requested
 
Methods inherited from class org.apache.xml.security.stax.ext.AbstractInputProcessor
addAfterProcessor, addBeforeProcessor, getAfterProcessors, getBeforeProcessors, getPhase, getReferenceIDAttribute, getSecurityProperties, setPhase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maximumAllowedXMLStructureDepth

protected static final Integer maximumAllowedXMLStructureDepth

maximumAllowedEncryptedDataEvents

protected static final Integer maximumAllowedEncryptedDataEvents
Constructor Detail

AbstractDecryptInputProcessor

public AbstractDecryptInputProcessor(XMLSecurityProperties securityProperties)
                              throws XMLSecurityException
Throws:
XMLSecurityException

AbstractDecryptInputProcessor

public AbstractDecryptInputProcessor(org.apache.xml.security.binding.xmldsig.KeyInfoType keyInfoType,
                                     org.apache.xml.security.binding.xmlenc.ReferenceList referenceList,
                                     XMLSecurityProperties securityProperties)
                              throws XMLSecurityException
Throws:
XMLSecurityException
Method Detail

getReferences

public Map<String,org.apache.xml.security.binding.xmlenc.ReferenceType> getReferences()

getProcessedReferences

public List<org.apache.xml.security.binding.xmlenc.ReferenceType> getProcessedReferences()

processNextHeaderEvent

public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
                                   throws XMLStreamException,
                                          XMLSecurityException
Description copied from interface: InputProcessor
Will be called from the framework when the next security-header XMLEvent is requested

Specified by:
processNextHeaderEvent in interface InputProcessor
Specified by:
processNextHeaderEvent in class AbstractInputProcessor
Returns:
The next XMLSecEvent
Throws:
XMLStreamException - thrown when a streaming error occurs
XMLSecurityException - thrown when a Security failure occurs

processNextEvent

public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
                             throws XMLStreamException,
                                    XMLSecurityException
Description copied from interface: InputProcessor
Will be called from the framework when the next XMLEvent is requested

Specified by:
processNextEvent in interface InputProcessor
Specified by:
processNextEvent in class AbstractInputProcessor
Returns:
The next XMLSecEvent
Throws:
XMLStreamException - thrown when a streaming error occurs
XMLSecurityException - thrown when a Security failure occurs

applyTransforms

protected InputStream applyTransforms(org.apache.xml.security.binding.xmlenc.ReferenceType referenceType,
                                      InputStream inputStream)
                               throws XMLSecurityException
Throws:
XMLSecurityException

newDecryptedEventReaderInputProcessor

protected abstract AbstractDecryptInputProcessor.AbstractDecryptedEventReaderInputProcessor newDecryptedEventReaderInputProcessor(boolean encryptedHeader,
                                                                                                                                  XMLSecStartElement xmlSecStartElement,
                                                                                                                                  org.apache.xml.security.binding.xmlenc.EncryptedDataType currentEncryptedDataType,
                                                                                                                                  InboundSecurityToken inboundSecurityToken,
                                                                                                                                  InboundSecurityContext inboundSecurityContext)
                                                                                                                           throws XMLSecurityException
Throws:
XMLSecurityException

handleSecurityToken

protected abstract void handleSecurityToken(InboundSecurityToken inboundSecurityToken,
                                            InboundSecurityContext inboundSecurityContext,
                                            org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType)
                                     throws XMLSecurityException
Throws:
XMLSecurityException

handleEncryptedContent

protected abstract void handleEncryptedContent(InputProcessorChain inputProcessorChain,
                                               XMLSecStartElement parentXMLSecStartElement,
                                               InboundSecurityToken inboundSecurityToken,
                                               org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType)
                                        throws XMLSecurityException
Throws:
XMLSecurityException

handleCipherReference

protected abstract void handleCipherReference(InputProcessorChain inputProcessorChain,
                                              org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType,
                                              Cipher cipher,
                                              InboundSecurityToken inboundSecurityToken)
                                       throws XMLSecurityException
Throws:
XMLSecurityException

matchesReferenceId

protected org.apache.xml.security.binding.xmlenc.ReferenceType matchesReferenceId(XMLSecStartElement xmlSecStartElement)

doFinal

public void doFinal(InputProcessorChain inputProcessorChain)
             throws XMLStreamException,
                    XMLSecurityException
Description copied from interface: InputProcessor
Will be called when the whole document is processed.

Specified by:
doFinal in interface InputProcessor
Overrides:
doFinal in class AbstractInputProcessor
Throws:
XMLStreamException - thrown when a streaming error occurs
XMLSecurityException - thrown when a Security failure occurs


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.