Class AbstractSignatureReferenceVerifyInputProcessor
java.lang.Object
org.apache.xml.security.stax.ext.AbstractInputProcessor
org.apache.xml.security.stax.impl.processor.input.AbstractSignatureReferenceVerifyInputProcessor
- All Implemented Interfaces:
InputProcessor
- Direct Known Subclasses:
XMLSignatureReferenceVerifyInputProcessor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Booleanprotected static final Booleanprivate final List<KeyValue<ResourceResolver, ReferenceType>> private final InboundSecurityTokenprivate static final org.slf4j.Loggerprotected static final Integerprotected static final Integerprivate final List<ReferenceType> private final List<KeyValue<ResourceResolver, ReferenceType>> private final SignatureType -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSignatureReferenceVerifyInputProcessor(InputProcessorChain inputProcessorChain, SignatureType signatureType, InboundSecurityToken inboundSecurityToken, XMLSecurityProperties securityProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected TransformerbuildTransformerChain(ReferenceType referenceType, OutputStream outputStream, InputProcessorChain inputProcessorChain, AbstractSignatureReferenceVerifyInputProcessor.InternalSignatureReferenceVerifier internalSignatureReferenceVerifier) protected voidcompareDigest(byte[] calculatedDigest, ReferenceType referenceType) protected DigestOutputStreamcreateMessageDigestOutputStream(ReferenceType referenceType, InboundSecurityContext inboundSecurityContext) voiddoFinal(InputProcessorChain inputProcessorChain) Will be called when the whole document is processed.getSignatureReferenceVerifier(XMLSecurityProperties securityProperties, InputProcessorChain inputProcessorChain, ReferenceType referenceType, XMLSecStartElement startElement) protected abstract voidprocessElementPath(List<QName> elementPath, InputProcessorChain inputProcessorChain, XMLSecEvent xmlSecEvent, ReferenceType referenceType) 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 requestedprotected List<ReferenceType> resolvesResource(XMLSecStartElement xmlSecStartElement) protected voidverifyExternalReference(InputProcessorChain inputProcessorChain, InputStream inputStream, ReferenceType referenceType) Methods inherited from class AbstractInputProcessor
addAfterProcessor, addBeforeProcessor, getAfterProcessors, getBeforeProcessors, getPhase, getReferenceIDAttribute, getSecurityProperties, setPhase
-
Field Details
-
LOG
private static final transient org.slf4j.Logger LOG -
maximumAllowedReferencesPerManifest
-
maximumAllowedTransformsPerReference
-
doNotThrowExceptionForManifests
-
allowNotSameDocumentReferences
-
signatureType
-
inboundSecurityToken
-
sameDocumentReferences
-
externalReferences
-
processedReferences
-
-
Constructor Details
-
AbstractSignatureReferenceVerifyInputProcessor
public AbstractSignatureReferenceVerifyInputProcessor(InputProcessorChain inputProcessorChain, SignatureType signatureType, InboundSecurityToken inboundSecurityToken, XMLSecurityProperties securityProperties) throws XMLSecurityException - Throws:
XMLSecurityException
-
-
Method Details
-
getSignatureType
-
getProcessedReferences
-
getInboundSecurityToken
-
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- Parameters:
inputProcessorChain-- 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- Parameters:
inputProcessorChain-- Returns:
- The next XMLSecEvent
- Throws:
XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
processElementPath
protected abstract void processElementPath(List<QName> elementPath, InputProcessorChain inputProcessorChain, XMLSecEvent xmlSecEvent, ReferenceType referenceType) throws XMLSecurityException - Throws:
XMLSecurityException
-
resolvesResource
-
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- Parameters:
inputProcessorChain-- Throws:
XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
getSignatureReferenceVerifier
protected AbstractSignatureReferenceVerifyInputProcessor.InternalSignatureReferenceVerifier getSignatureReferenceVerifier(XMLSecurityProperties securityProperties, InputProcessorChain inputProcessorChain, ReferenceType referenceType, XMLSecStartElement startElement) throws XMLSecurityException - Throws:
XMLSecurityException
-
verifyExternalReference
protected void verifyExternalReference(InputProcessorChain inputProcessorChain, InputStream inputStream, ReferenceType referenceType) throws XMLSecurityException, XMLStreamException -
createMessageDigestOutputStream
protected DigestOutputStream createMessageDigestOutputStream(ReferenceType referenceType, InboundSecurityContext inboundSecurityContext) throws XMLSecurityException - Throws:
XMLSecurityException
-
buildTransformerChain
protected Transformer buildTransformerChain(ReferenceType referenceType, OutputStream outputStream, InputProcessorChain inputProcessorChain, AbstractSignatureReferenceVerifyInputProcessor.InternalSignatureReferenceVerifier internalSignatureReferenceVerifier) throws XMLSecurityException - Throws:
XMLSecurityException
-
compareDigest
protected void compareDigest(byte[] calculatedDigest, ReferenceType referenceType) throws XMLSecurityException - Throws:
XMLSecurityException
-