Class DecryptionSignedContentTest
- java.lang.Object
-
- org.opensaml.core.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.xml.XMLObjectBaseTestCase
-
- org.opensaml.xmlsec.encryption.support.DecryptionSignedContentTest
-
public class DecryptionSignedContentTest extends org.opensaml.core.xml.XMLObjectBaseTestCaseTest decryption of signed content.
-
-
Field Summary
Fields Modifier and Type Field Description private org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolverencKeyResolverResolver for the data encryption key.private org.opensaml.xmlsec.encryption.support.DataEncryptionParametersencParamsThe data encryption parameters object.private StringidValueThe ID value used as the signature Reference URI attribute value, set on root SimpleXMLObject.private org.opensaml.security.credential.CredentialsigningCredentialCredential used to sign and verify.
-
Constructor Summary
Constructors Constructor Description DecryptionSignedContentTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ElementgetSignedElement()Creates a signed SimpleXMLObject element.protected voidsetUp()voidtestDecryptAndVerifySignedElement()Test decryption of signed object and then verify signature.voidtestPlainRoundTripSignature()Just a sanity check that unit test is set up correctly.-
Methods inherited from class org.opensaml.core.xml.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
-
-
-
-
Field Detail
-
signingCredential
private org.opensaml.security.credential.Credential signingCredential
Credential used to sign and verify.
-
encParams
private org.opensaml.xmlsec.encryption.support.DataEncryptionParameters encParams
The data encryption parameters object.
-
encKeyResolver
private org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolver encKeyResolver
Resolver for the data encryption key.
-
idValue
private String idValue
The ID value used as the signature Reference URI attribute value, set on root SimpleXMLObject.
-
-
Method Detail
-
setUp
@BeforeMethod protected void setUp() throws Exception
- Throws:
Exception
-
testDecryptAndVerifySignedElement
public void testDecryptAndVerifySignedElement() throws org.opensaml.core.xml.io.MarshallingException, org.opensaml.core.xml.io.UnmarshallingException, org.opensaml.xmlsec.encryption.support.EncryptionException, org.opensaml.xmlsec.encryption.support.DecryptionException, net.shibboleth.utilities.java.support.xml.XMLParserException, IOException, org.opensaml.xmlsec.signature.support.SignatureExceptionTest decryption of signed object and then verify signature.- Throws:
org.opensaml.core.xml.io.MarshallingException- ...org.opensaml.core.xml.io.UnmarshallingException- ...org.opensaml.xmlsec.encryption.support.EncryptionException- ...org.opensaml.xmlsec.encryption.support.DecryptionException- ...net.shibboleth.utilities.java.support.xml.XMLParserException- ...IOException- ...org.opensaml.xmlsec.signature.support.SignatureException- ...
-
testPlainRoundTripSignature
public void testPlainRoundTripSignature() throws org.opensaml.core.xml.io.MarshallingException, org.opensaml.core.xml.io.UnmarshallingException, org.opensaml.xmlsec.signature.support.SignatureExceptionJust a sanity check that unit test is set up correctly.- Throws:
org.opensaml.core.xml.io.MarshallingException- ...org.opensaml.core.xml.io.UnmarshallingException- ...org.opensaml.xmlsec.signature.support.SignatureException- ...
-
getSignedElement
private Element getSignedElement() throws org.opensaml.core.xml.io.MarshallingException, org.opensaml.xmlsec.signature.support.SignatureException
Creates a signed SimpleXMLObject element.- Returns:
- a XMLObject that has a Signature child element
- Throws:
org.opensaml.core.xml.io.MarshallingException- ...org.opensaml.xmlsec.signature.support.SignatureException- ...
-
-