Class ChainingEncryptedKeyResolverTest


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

      • ChainingEncryptedKeyResolverTest

        public ChainingEncryptedKeyResolverTest()
    • Method Detail

      • testEmptyChain

        public void testEmptyChain()
        Test error case of empty resolver chain.
      • testSingleEKInline

        public void testSingleEKInline()
        One recipient specified to resolver, EncryptedKey in instance inline.
      • testSingleEKRetrievalMethod

        public void testSingleEKRetrievalMethod()
        One recipient specified to resolver, EncryptedKey in instance via RetrievalMethod .
      • testMultiEKWithOneRecipient

        public void testMultiEKWithOneRecipient()
        One recipient specified to resolver, EncryptedKeys in instance inline and via RetrievalMethod .
      • testMultiEKWithTwoRecipients

        public void testMultiEKWithTwoRecipients()
        Two recipients specified to resolver, EncryptedKeys in instance inline and via RetrievalMethod .
      • getEncryptedKeys

        private List<EncryptedKey> getEncryptedKeys​(SignableSimpleXMLObject sxo)
        Extract all the EncryptedKey's from the SignableSimpleXMLObject.
        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