public class EnvelopedSignatureTest
extends org.opensaml.core.xml.XMLObjectBaseTestCase
Signature and its marshallers and unmarshallers.| Modifier and Type | Field and Description |
|---|---|
private String |
algoURI
Signature algorithm URI.
|
private org.opensaml.security.credential.Credential |
badCredential
Invalid credential for verification.
|
private org.opensaml.security.credential.Credential |
goodCredential
Credential used to sign and verify.
|
private Logger |
log
Class logger.
|
private org.opensaml.xmlsec.signature.impl.SignatureBuilder |
sigBuilder
Builder of Signature XML objects.
|
private SignableSimpleXMLObjectBuilder |
sxoBuilder
Builder of mock XML objects.
|
| Constructor and Description |
|---|
EnvelopedSignatureTest() |
| Modifier and Type | Method and Description |
|---|---|
private SignableSimpleXMLObject |
getXMLObjectWithSignature()
Creates a XMLObject that has a Signature child element.
|
protected void |
setUp() |
void |
testSigningAndVerification()
Tests creating an enveloped signature and then verifying it.
|
void |
testUnmarshall()
Tests unmarshalling an enveloped signature.
|
assertXMLEquals, assertXMLEquals, buildXMLObject, fetchDuration, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElementprivate final Logger log
private org.opensaml.security.credential.Credential goodCredential
private org.opensaml.security.credential.Credential badCredential
private SignableSimpleXMLObjectBuilder sxoBuilder
private org.opensaml.xmlsec.signature.impl.SignatureBuilder sigBuilder
private String algoURI
public void testSigningAndVerification()
throws org.opensaml.core.xml.io.MarshallingException,
ValidationException,
org.opensaml.xmlsec.signature.support.SignatureException
org.opensaml.core.xml.io.MarshallingException - thrown if the XMLObject tree can not be marshalledValidationExceptionSignatureExceptionpublic void testUnmarshall()
throws net.shibboleth.utilities.java.support.xml.XMLParserException,
org.opensaml.core.xml.io.UnmarshallingException,
GeneralSecurityException
net.shibboleth.utilities.java.support.xml.XMLParserException - thrown if the XML can not be parsedorg.opensaml.core.xml.io.UnmarshallingException - thrown if the DOM can not be unmarshalledGeneralSecurityExceptionprivate SignableSimpleXMLObject getXMLObjectWithSignature()
Copyright © 1999–2015. All rights reserved.