Class DecryptionPlusSigningTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.saml2.encryption.tests.DecryptionPlusSigningTest
-
public class DecryptionPlusSigningTest extends XMLObjectBaseTestCase
Tests that decryption of an Assertion does not invalidate the signature of a containing object (Response).
-
-
Field Summary
Fields Modifier and Type Field Description private DataEncryptionParametersencParamsprivate Encrypterencrypterprivate StringencURIprivate KeyInfoCredentialResolverkeyResolverprivate CredentialsigningCred-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description DecryptionPlusSigningTest()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private DocumentgetDOM(String filename)Parse the XML file and return the DOM Document.protected voidsetUp()voidtestEncryptedAssertionInResponse()Test decryption of an EncryptedAssertion and validation of the signature on the enclosing Response.-
Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
-
Methods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
keyResolver
private KeyInfoCredentialResolver keyResolver
-
encURI
private String encURI
-
encParams
private DataEncryptionParameters encParams
-
encrypter
private Encrypter encrypter
-
signingCred
private Credential signingCred
-
-
Method Detail
-
testEncryptedAssertionInResponse
public void testEncryptedAssertionInResponse() throws XMLParserException, EncryptionException, NoSuchAlgorithmException, NoSuchProviderException, SecurityException, MarshallingException, SignatureException, UnmarshallingExceptionTest decryption of an EncryptedAssertion and validation of the signature on the enclosing Response.- Throws:
XMLParserException- thrown if there is an error parsing the control XML fileEncryptionException- thrown if there is an error encrypting the control XMLNoSuchProviderException- ...NoSuchAlgorithmException- ...SecurityException- ...MarshallingException- ...SignatureException- ...UnmarshallingException- ...
-
getDOM
private Document getDOM(String filename) throws XMLParserException
Parse the XML file and return the DOM Document.- Parameters:
filename- file containing control XML- Returns:
- parsed Document
- Throws:
XMLParserException- if parser encounters an error
-
-