public class DetachedSignatureTest
extends org.opensaml.core.xml.XMLObjectBaseTestCase
| Modifier and Type | Field and Description |
|---|---|
private String |
algoURI
Signature algorithm URI.
|
private org.opensaml.security.credential.BasicCredential |
badCredential
Key resolver containing invalid verification key.
|
private org.opensaml.security.credential.BasicCredential |
goodCredential
Key resolver containing proper verification key.
|
private Logger |
log
Class logger.
|
private net.shibboleth.utilities.java.support.xml.BasicParserPool |
parserPool
Parser pool used to parse example config files.
|
private org.opensaml.xmlsec.signature.impl.SignatureBuilder |
sigBuilder
Builder of Signature XML objects.
|
private SignableSimpleXMLObjectBuilder |
sxoBuilder
Builder of mock XML objects.
|
| Constructor and Description |
|---|
DetachedSignatureTest() |
| Modifier and Type | Method and Description |
|---|---|
private SignableSimpleXMLObject |
getXMLObjectWithSignature()
Creates a XMLObject that has another XMLObject and a Signature as children.
|
protected void |
setUp() |
void |
testExternalSignatureAndVerification()
Tests creating a detached signature within a different document as the element signed and then verifying it.
|
void |
testInternalSignatureAndVerification()
Tests creating a detached signature within the same document as the element signed and then verifying it.
|
assertXMLEquals, assertXMLEquals, buildXMLObject, fetchDuration, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElementprivate final Logger log
private org.opensaml.security.credential.BasicCredential goodCredential
private org.opensaml.security.credential.BasicCredential badCredential
private SignableSimpleXMLObjectBuilder sxoBuilder
private org.opensaml.xmlsec.signature.impl.SignatureBuilder sigBuilder
private net.shibboleth.utilities.java.support.xml.BasicParserPool parserPool
private String algoURI
public void testInternalSignatureAndVerification()
throws org.opensaml.core.xml.io.MarshallingException,
org.opensaml.core.xml.io.UnmarshallingException,
org.opensaml.xmlsec.signature.support.SignatureException
org.opensaml.core.xml.io.MarshallingException - thrown if the XMLObject tree can not be marshalledValidationException - thrown if there is a problem attempting to validate the signatureorg.opensaml.core.xml.io.UnmarshallingException - thrown if the signature can not be unmarshalledSignatureExceptionpublic void testExternalSignatureAndVerification()
throws org.opensaml.core.xml.io.MarshallingException,
org.opensaml.xmlsec.signature.support.SignatureException
org.opensaml.core.xml.io.MarshallingException - thrown if the XMLObject tree can not be marshalledValidationException - thrown if the signature verification failsSignatureExceptionprivate SignableSimpleXMLObject getXMLObjectWithSignature()
Copyright © 1999–2015. All rights reserved.