Package org.opensaml.saml.security.impl
Class SAMLMetadataEncryptionParametersResolverTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.security.impl.SAMLMetadataEncryptionParametersResolverTest
-
public class SAMLMetadataEncryptionParametersResolverTest extends XMLObjectBaseTestCase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSAMLMetadataEncryptionParametersResolverTest.MapBasedKeyTransportAlgorithmPredicate
-
Field Summary
-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description SAMLMetadataEncryptionParametersResolverTest()
-
Method Summary
-
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
-
mdCredResolver
private MetadataCredentialResolver mdCredResolver
-
resolver
private SAMLMetadataEncryptionParametersResolver resolver
-
criteriaSet
private CriteriaSet criteriaSet
-
configCriterion
private EncryptionConfigurationCriterion configCriterion
-
config1
private BasicEncryptionConfiguration config1
-
config2
private BasicEncryptionConfiguration config2
-
config3
private BasicEncryptionConfiguration config3
-
rsaCred1
private Credential rsaCred1
-
rsaCred1KeyName
private String rsaCred1KeyName
-
dsaCred1
private Credential dsaCred1
-
dsaCred1KeyName
private String dsaCred1KeyName
-
ecCred1
private Credential ecCred1
-
ecCred1KeyName
private String ecCred1KeyName
-
defaultRSAKeyTransportAlgo
private String defaultRSAKeyTransportAlgo
-
defaultAES128DataAlgo
private String defaultAES128DataAlgo
-
defaultAES192DataAlgo
private String defaultAES192DataAlgo
-
defaultAES256DataAlgo
private String defaultAES256DataAlgo
-
defaultKeyTransportKeyInfoGeneratorManager
private NamedKeyInfoGeneratorManager defaultKeyTransportKeyInfoGeneratorManager
-
defaultDataEncryptionKeyInfoGeneratorManager
private NamedKeyInfoGeneratorManager defaultDataEncryptionKeyInfoGeneratorManager
-
roleDescCriterion
private RoleDescriptorCriterion roleDescCriterion
-
roleDesc
private RoleDescriptor roleDesc
-
targetEntityID
private String targetEntityID
-
providerSupport
private SecurityProviderTestSupport providerSupport
-
-
Method Detail
-
buildCredentials
@BeforeClass public void buildCredentials() throws NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException
-
setUp
@BeforeMethod public void setUp() throws ComponentInitializationException- Throws:
ComponentInitializationException
-
testBasic
public void testBasic() throws ResolverException- Throws:
ResolverException
-
testWithRSAOAEPParametersFromConfig
public void testWithRSAOAEPParametersFromConfig() throws ResolverException- Throws:
ResolverException
-
testWithAlgorithmOverrides
public void testWithAlgorithmOverrides() throws ResolverException- Throws:
ResolverException
-
testWithBlacklist
public void testWithBlacklist() throws ResolverException- Throws:
ResolverException
-
testWithWhitelist
public void testWithWhitelist() throws ResolverException- Throws:
ResolverException
-
testGeneratedDataCredential
public void testGeneratedDataCredential() throws ResolverException- Throws:
ResolverException
-
testEncryptionMethod
public void testEncryptionMethod() throws ResolverException- Throws:
ResolverException
-
testEncryptionMethodWithRSAOAEPParameters
public void testEncryptionMethodWithRSAOAEPParameters() throws ResolverException, InitializationException
-
testKeyTransportAlgorithmPredicate
public void testKeyTransportAlgorithmPredicate() throws ResolverException- Throws:
ResolverException
-
testEncryptionMethodWithBlacklist
public void testEncryptionMethodWithBlacklist() throws ResolverException- Throws:
ResolverException
-
testEncryptionMethodWithWhitelist
public void testEncryptionMethodWithWhitelist() throws ResolverException- Throws:
ResolverException
-
testEncryptionMethodWithBlacklistedDigest
public void testEncryptionMethodWithBlacklistedDigest() throws ResolverException- Throws:
ResolverException
-
testECDHWithNoEncryptionMethodsAndKeyWrapDefault
public void testECDHWithNoEncryptionMethodsAndKeyWrapDefault() throws ResolverException- Throws:
ResolverException
-
testECDHWithNoEncryptionMethodsAndKeyWrapAlways
public void testECDHWithNoEncryptionMethodsAndKeyWrapAlways() throws ResolverException- Throws:
ResolverException
-
testECDHWithNoEncryptionMethodsAndKeyWrapNever
public void testECDHWithNoEncryptionMethodsAndKeyWrapNever() throws ResolverException- Throws:
ResolverException
-
testECDHWithNoEncryptionMethodsAndKeyWrapIfNotIndicated
public void testECDHWithNoEncryptionMethodsAndKeyWrapIfNotIndicated() throws ResolverException- Throws:
ResolverException
-
testECDHWithBlockEncryptionMethodAndKeyWrapDefault
public void testECDHWithBlockEncryptionMethodAndKeyWrapDefault() throws ResolverException- Throws:
ResolverException
-
testECDHWithBlockEncryptionMethodAndKeyWrapAlways
public void testECDHWithBlockEncryptionMethodAndKeyWrapAlways() throws ResolverException- Throws:
ResolverException
-
testECDHWithKeyWrapEncryptionMethodAndKeyWrapDefault
public void testECDHWithKeyWrapEncryptionMethodAndKeyWrapDefault() throws ResolverException- Throws:
ResolverException
-
testECDHWithKeyWrapEncryptionMethodAndKeyWrapNever
public void testECDHWithKeyWrapEncryptionMethodAndKeyWrapNever() throws ResolverException- Throws:
ResolverException
-
testECDHWithBlockAndKeyWrapEncryptionMethods
public void testECDHWithBlockAndKeyWrapEncryptionMethods() throws ResolverException- Throws:
ResolverException
-
testECDHWithKeyWrapEncryptionMethodAndGeneratedDataCredential
public void testECDHWithKeyWrapEncryptionMethodAndGeneratedDataCredential() throws ResolverException- Throws:
ResolverException
-
testECDHWithKDFOverride
public void testECDHWithKDFOverride() throws ResolverException- Throws:
ResolverException
-
testGetEffectiveKeyAgreementConfiguration
public void testGetEffectiveKeyAgreementConfiguration()
-
testDefaultKeyAgreementUseKeyWrap
public void testDefaultKeyAgreementUseKeyWrap()
-
testMultipleKeyDescriptors
public void testMultipleKeyDescriptors() throws ResolverException- Throws:
ResolverException
-
testOnlySigningDescriptor
public void testOnlySigningDescriptor() throws ResolverException- Throws:
ResolverException
-
testDSACredWithUnspecifiedUse
public void testDSACredWithUnspecifiedUse() throws ResolverException- Throws:
ResolverException
-
testRSACredWithUnspecifiedUse
public void testRSACredWithUnspecifiedUse() throws ResolverException- Throws:
ResolverException
-
testKeyInfoGenerationProfile
public void testKeyInfoGenerationProfile() throws ResolverException- Throws:
ResolverException
-
testResolve
public void testResolve() throws ResolverException- Throws:
ResolverException
-
testNoCredentials
public void testNoCredentials() throws ResolverException- Throws:
ResolverException
-
testNoKeyTransportAlgorithms
public void testNoKeyTransportAlgorithms() throws ResolverException- Throws:
ResolverException
-
testNoDataEncryptionAlgorithmForEncrypterAutoGen
public void testNoDataEncryptionAlgorithmForEncrypterAutoGen() throws ResolverException- Throws:
ResolverException
-
testNullCriteriaSet
public void testNullCriteriaSet() throws ResolverException- Throws:
ResolverException
-
testAbsentCriterion
public void testAbsentCriterion() throws ResolverException- Throws:
ResolverException
-
buildRoleDescriptorSkeleton
private RoleDescriptor buildRoleDescriptorSkeleton()
-
buildKeyDescriptor
private KeyDescriptor buildKeyDescriptor(String keyName, UsageType use, Object... contentItems)
-
buildEncryptionMethod
private EncryptionMethod buildEncryptionMethod(String algorithm)
-
-