Class AbstractDecryptInputProcessor
java.lang.Object
org.apache.xml.security.stax.ext.AbstractInputProcessor
org.apache.xml.security.stax.impl.processor.input.AbstractDecryptInputProcessor
- All Implemented Interfaces:
InputProcessor
- Direct Known Subclasses:
XMLDecryptInputProcessor
Processor for decryption of EncryptedData XML structures
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThe DecryptedEventReaderInputProcessor reads the decrypted stream with a StAX reader and forwards the generated XMLEvents -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDecryptInputProcessor(org.apache.xml.security.binding.xmldsig.KeyInfoType keyInfoType, org.apache.xml.security.binding.xmlenc.ReferenceList referenceList, XMLSecurityProperties securityProperties) AbstractDecryptInputProcessor(XMLSecurityProperties securityProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamapplyTransforms(org.apache.xml.security.binding.xmlenc.ReferenceType referenceType, InputStream inputStream) voiddoFinal(InputProcessorChain inputProcessorChain) Will be called when the whole document is processed.List<org.apache.xml.security.binding.xmlenc.ReferenceType>protected abstract voidhandleCipherReference(InputProcessorChain inputProcessorChain, org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType, Cipher cipher, InboundSecurityToken inboundSecurityToken) protected abstract voidhandleEncryptedContent(InputProcessorChain inputProcessorChain, XMLSecStartElement parentXMLSecStartElement, InboundSecurityToken inboundSecurityToken, org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType) protected abstract voidhandleSecurityToken(InboundSecurityToken inboundSecurityToken, InboundSecurityContext inboundSecurityContext, org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType) protected abstract InputStreamhandleXOPInclude(InputProcessorChain inputProcessorChain, org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType, String href, Cipher cipher, InboundSecurityToken inboundSecurityToken) protected org.apache.xml.security.binding.xmlenc.ReferenceTypematchesReferenceId(XMLSecStartElement xmlSecStartElement) protected abstract AbstractDecryptInputProcessor.AbstractDecryptedEventReaderInputProcessornewDecryptedEventReaderInputProcessor(boolean encryptedHeader, XMLSecStartElement xmlSecStartElement, org.apache.xml.security.binding.xmlenc.EncryptedDataType currentEncryptedDataType, InboundSecurityToken inboundSecurityToken, InboundSecurityContext inboundSecurityContext) processNextEvent(InputProcessorChain inputProcessorChain) Will be called from the framework when the next XMLEvent is requestedprocessNextHeaderEvent(InputProcessorChain inputProcessorChain) Will be called from the framework when the next security-header XMLEvent is requestedMethods inherited from class org.apache.xml.security.stax.ext.AbstractInputProcessor
addAfterProcessor, addBeforeProcessor, getAfterProcessors, getBeforeProcessors, getPhase, getReferenceIDAttribute, getSecurityProperties, setPhase
-
Field Details
-
maximumAllowedXMLStructureDepth
-
maximumAllowedEncryptedDataEvents
-
-
Constructor Details
-
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 Details
-
getReferences
-
getProcessedReferences
-
processNextHeaderEvent
public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException Description copied from interface:InputProcessorWill be called from the framework when the next security-header XMLEvent is requested- Specified by:
processNextHeaderEventin interfaceInputProcessor- Specified by:
processNextHeaderEventin classAbstractInputProcessor- Returns:
- The next XMLSecEvent
- Throws:
XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
processNextEvent
public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException Description copied from interface:InputProcessorWill be called from the framework when the next XMLEvent is requested- Specified by:
processNextEventin interfaceInputProcessor- Specified by:
processNextEventin classAbstractInputProcessor- Returns:
- The next XMLSecEvent
- Throws:
XMLStreamException- thrown when a streaming error occursXMLSecurityException- 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
-
handleXOPInclude
protected abstract InputStream handleXOPInclude(InputProcessorChain inputProcessorChain, org.apache.xml.security.binding.xmlenc.EncryptedDataType encryptedDataType, String href, 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:InputProcessorWill be called when the whole document is processed.- Specified by:
doFinalin interfaceInputProcessor- Overrides:
doFinalin classAbstractInputProcessor- Throws:
XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-