Class DetachedSignatureTest
java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.xmlsec.signature.support.tests.DetachedSignatureTest
public class DetachedSignatureTest
extends org.opensaml.core.testing.XMLObjectBaseTestCase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringSignature algorithm URI.private BasicCredentialKey resolver containing invalid verification key.private BasicCredentialKey resolver containing proper verification key.private final org.slf4j.LoggerClass logger.private BasicParserPoolParser pool used to parse example config files.private XMLObjectBuilder<Signature>Builder of Signature XML objects.private SignableSimpleXMLObjectBuilderBuilder of mock XML objects.Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, simpleXMLObjectQName, unmarshallerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate SignableSimpleXMLObjectCreates a XMLObject that has another XMLObject and a Signature as children.protected voidsetUp()voidTests creating a detached signature within a different document as the element signed and then verifying it.voidTests creating a detached signature within the same document as the element signed and then verifying it.Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElementMethods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
goodCredential
Key resolver containing proper verification key. -
badCredential
Key resolver containing invalid verification key. -
sxoBuilder
Builder of mock XML objects. -
sigBuilder
Builder of Signature XML objects. -
parserPool
Parser pool used to parse example config files. -
algoURI
Signature algorithm URI.
-
-
Constructor Details
-
DetachedSignatureTest
public DetachedSignatureTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testInternalSignatureAndVerification
public void testInternalSignatureAndVerification() throws MarshallingException, UnmarshallingException, SignatureExceptionTests creating a detached signature within the same document as the element signed and then verifying it.- Throws:
MarshallingException- thrown if the XMLObject tree can not be marshalledUnmarshallingException- thrown if the signature can not be unmarshalledSignatureException- ...
-
testExternalSignatureAndVerification
Tests creating a detached signature within a different document as the element signed and then verifying it. The external references used are the InCommon and InQueue metadata files.- Throws:
MarshallingException- thrown if the XMLObject tree can not be marshalledSignatureException- ...
-
getXMLObjectWithSignature
Creates a XMLObject that has another XMLObject and a Signature as children. The Signature is is a detached signature of its sibling.- Returns:
- the XMLObject
-