Class SimpleRetrievalMethodEncryptedKeyResolverTest


  • public class SimpleRetrievalMethodEncryptedKeyResolverTest
    extends XMLObjectBaseTestCase
    Test the encrypted key resolver which dereferences RetrievalMethods.
    • Constructor Detail

      • SimpleRetrievalMethodEncryptedKeyResolverTest

        public SimpleRetrievalMethodEncryptedKeyResolverTest()
    • Method Detail

      • testSingleEKNoRecipient

        public void testSingleEKNoRecipient()
        No recipients specified to resolver, one EncryptedKey in instance.
      • testSingleEKWithRecipient

        public void testSingleEKWithRecipient()
        One recipients specified to resolver, one EncryptedKey in instance.
      • testSingleEKWithTransform

        public void testSingleEKWithTransform()
        One recipients specified to resolver, RetrievalMethod has Transforms, so should fail.
      • testMultiEKWithOneRecipient

        public void testMultiEKWithOneRecipient()
        One recipients specified to resolver, three EncryptedKeys in instance, two RetrievalMethod references.
      • testMultiEKWithTwoRecipients

        public void testMultiEKWithTwoRecipients()
        Two recipients specified to resolver, three EncryptedKeys in instance, two RetrievalMethod references.
      • getEncryptedKeys

        private List<EncryptedKey> getEncryptedKeys​(SignableSimpleXMLObject sxo)
        Extract all the EncryptedKey's from the SimpleXMLObject.
        Parameters:
        sxo - the mock object to process
        Returns:
        a list of EncryptedKey elements
      • generateList

        private List<EncryptedKey> generateList​(EncryptedData encData,
                                                EncryptedKeyResolver ekResolver)
        Resolve EncryptedKeys and put them in an ordered list.
        Parameters:
        encData - the EncryptedData context
        ekResolver - the resolver to test
        Returns:
        list of resolved EncryptedKeys