Class DefaultEncryptionParametersResolverTest


  • public class DefaultEncryptionParametersResolverTest
    extends Object
    • Field Detail

      • resolver

        private net.shibboleth.oidc.security.jose.impl.DefaultEncryptionParametersResolver resolver
      • config

        private net.shibboleth.oidc.security.jose.impl.BasicEncryptionConfiguration config
    • Constructor Detail

      • DefaultEncryptionParametersResolverTest

        public DefaultEncryptionParametersResolverTest()
    • Method Detail

      • setUp

        @BeforeMethod
        public void setUp()
      • testBasicRSA_noDataEncryptionAlgs

        public void testBasicRSA_noDataEncryptionAlgs()
                                               throws Exception
        Throws:
        Exception
      • testBasicRSA_WrongAlgorithmInConfig

        public void testBasicRSA_WrongAlgorithmInConfig()
                                                 throws Exception
        Throws:
        Exception
      • testBasicRSA_NoAlgorithmSpecifiedInJWKCredential

        public void testBasicRSA_NoAlgorithmSpecifiedInJWKCredential()
                                                              throws Exception
        Throws:
        Exception
      • testBasicRSA_WrongAlgorithmInFirstKey_ChooseSecondKey

        public void testBasicRSA_WrongAlgorithmInFirstKey_ChooseSecondKey()
                                                                   throws Exception
        Throws:
        Exception
      • testBasicAESKeyWrap

        public void testBasicAESKeyWrap()
                                 throws Exception
        Throws:
        Exception
      • testBasicAESKeyWrap_KeyWrapKeySizeDifferentThanEncryptionMethod

        public void testBasicAESKeyWrap_KeyWrapKeySizeDifferentThanEncryptionMethod()
                                                                             throws Exception
        The resolver only needs to resolve key wrapping credentials compatible with the key wrapping algorithm. It should not matter what the encryption method use is e.g. 192bit key for KW, and 256 bit key used for encryption, we only need to check the key for KW.
        Throws:
        Exception - on error
      • testBasicAESKeyWrap_WrongKeyLength

        public void testBasicAESKeyWrap_WrongKeyLength()
                                                throws Exception
        Throws:
        Exception
      • testBasicAESKeyWrapWhenRSAKeyAlsoExists

        public void testBasicAESKeyWrapWhenRSAKeyAlsoExists()
                                                     throws Exception
        Throws:
        Exception
      • testBasicAESKeyWrapWhenRSAKeyAlsoExists_CheckOrderingIsPreserved

        public void testBasicAESKeyWrapWhenRSAKeyAlsoExists_CheckOrderingIsPreserved()
                                                                              throws Exception
        Throws:
        Exception
      • testBasicAESKeyWrapWhenRSAKeyAlsoExists_CheckOrderingIsPreserved_RSAFirst

        public void testBasicAESKeyWrapWhenRSAKeyAlsoExists_CheckOrderingIsPreserved_RSAFirst()
                                                                                       throws Exception
        Throws:
        Exception
      • testBasicAESKeyWrap_WrongKeyAndUsageType

        public void testBasicAESKeyWrap_WrongKeyAndUsageType()
                                                      throws Exception
        Throws:
        Exception
      • testBasicDirectEncryption

        public void testBasicDirectEncryption()
                                       throws Exception
        Throws:
        Exception