Class DecryptionSignedContentTest
- java.lang.Object
-
- org.opensaml.core.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.xml.XMLObjectBaseTestCase
-
- org.opensaml.xmlsec.encryption.support.DecryptionSignedContentTest
-
public class DecryptionSignedContentTest extends XMLObjectBaseTestCase
Test decryption of signed content.
-
-
Field Summary
Fields Modifier and Type Field Description private KeyInfoCredentialResolverencKeyResolverResolver for the data encryption key.private DataEncryptionParametersencParamsThe data encryption parameters object.private StringidValueThe ID value used as the signature Reference URI attribute value, set on root SimpleXMLObject.private CredentialsigningCredentialCredential used to sign and verify.-
Fields inherited from class org.opensaml.core.xml.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
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
-
Methods inherited from class org.opensaml.core.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
signingCredential
private Credential signingCredential
Credential used to sign and verify.
-
encParams
private DataEncryptionParameters encParams
The data encryption parameters object.
-
encKeyResolver
private 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 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
private Element getSignedElement() throws MarshallingException, SignatureException
Creates a signed SimpleXMLObject element.- Returns:
- a XMLObject that has a Signature child element
- Throws:
MarshallingException- ...SignatureException- ...
-
-