Class SimpleEncryptionTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.saml2.encryption.tests.SimpleEncryptionTest
-
public class SimpleEncryptionTest extends XMLObjectBaseTestCase
Simple tests for encryption.
-
-
Field Summary
Fields Modifier and Type Field Description private StringalgoURIprivate DataEncryptionParametersencParamsprivate Encrypterencrypterprivate StringexpectedKeyNameprivate List<KeyEncryptionParameters>kekParamsListprivate KeyEncryptionParameterskekParamsRSAprivate StringkekURIRSAprivate KeyInfokeyInfo-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description SimpleEncryptionTest()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetUp()voidtestAssertion()Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.voidtestAssertionAsID()Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.voidtestAttribute()Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.voidtestAutoKeyGen()Test that a data encryption key is auto-generated if it is not supplied.voidtestAutoKeyGenNoKEK()Test that an error is thrown if the no data encryption credential is supplied and no KEK is specified.voidtestNameID()Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.voidtestNewID()Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.voidtestReuse()Test that reuse of the encrypter with the same encryption and key encryption parameters is allowed.-
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
-
encrypter
private Encrypter encrypter
-
encParams
private DataEncryptionParameters encParams
-
kekParamsRSA
private KeyEncryptionParameters kekParamsRSA
-
kekParamsList
private List<KeyEncryptionParameters> kekParamsList
-
keyInfo
private KeyInfo keyInfo
-
algoURI
private String algoURI
-
expectedKeyName
private String expectedKeyName
-
kekURIRSA
private String kekURIRSA
-
-
Method Detail
-
testAssertion
public void testAssertion()
Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.
-
testAssertionAsID
public void testAssertionAsID()
Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.
-
testNameID
public void testNameID()
Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.
-
testAttribute
public void testAttribute()
Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.
-
testNewID
public void testNewID()
Test basic encryption with symmetric key, no key wrap, set key name in passed KeyInfo object.
-
testReuse
public void testReuse()
Test that reuse of the encrypter with the same encryption and key encryption parameters is allowed.
-
testAutoKeyGen
public void testAutoKeyGen()
Test that a data encryption key is auto-generated if it is not supplied.
-
testAutoKeyGenNoKEK
public void testAutoKeyGenNoKEK()
Test that an error is thrown if the no data encryption credential is supplied and no KEK is specified.
-
-