Class DecryptionSignedContentTest
java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.xmlsec.encryption.support.tests.DecryptionSignedContentTest
public class DecryptionSignedContentTest
extends org.opensaml.core.testing.XMLObjectBaseTestCase
Test decryption of signed content.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate KeyInfoCredentialResolverResolver for the data encryption key.private DataEncryptionParametersThe data encryption parameters object.private StringThe ID value used as the signature Reference URI attribute value, set on root SimpleXMLObject.private CredentialCredential used to sign and verify.Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory -
Constructor Summary
Constructors -
Method Summary
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
-
signingCredential
Credential used to sign and verify. -
encParams
The data encryption parameters object. -
encKeyResolver
Resolver for the data encryption key. -
idValue
The ID value used as the signature Reference URI attribute value, set on root SimpleXMLObject.
-
-
Constructor Details
-
DecryptionSignedContentTest
public DecryptionSignedContentTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testDecryptAndVerifySignedElement
public void testDecryptAndVerifySignedElement() throws MarshallingException, UnmarshallingException, EncryptionException, DecryptionException, XMLParserException, IOException, SignatureExceptionTest decryption of signed object and then verify signature.- Throws:
MarshallingException- ...UnmarshallingException- ...EncryptionException- ...DecryptionException- ...XMLParserException- ...IOException- ...SignatureException- ...
-
testPlainRoundTripSignature
public void testPlainRoundTripSignature() throws MarshallingException, UnmarshallingException, SignatureExceptionJust a sanity check that unit test is set up correctly.- Throws:
MarshallingException- ...UnmarshallingException- ...SignatureException- ...
-
getSignedElement
Creates a signed SimpleXMLObject element.- Returns:
- a XMLObject that has a Signature child element
- Throws:
MarshallingException- ...SignatureException- ...
-