Class ExplicitKeySignatureTrustEngineTest
java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.xmlsec.signature.support.impl.ExplicitKeySignatureTrustEngineTest
public class ExplicitKeySignatureTrustEngineTest
extends org.opensaml.core.testing.XMLObjectBaseTestCase
Test explicit key signature trust engine.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CollectionCredentialResolverprivate CriteriaSetprivate ExplicitKeySignatureTrustEngineprivate X509Certificateprivate Stringprivate Stringprivate byte[]private Stringprivate X509Certificateprivate Stringprivate Stringprivate PrivateKeyprivate Stringprivate BasicX509Credentialprivate List<Credential>Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SignableXMLObjectBuild a signed object.protected SignableXMLObjectGet a signed object containing the signature to be validated.protected SignableXMLObjectGet a signed object containing the signature to be validated.protected voidsetUp()voidTest blacklisted digest method algorithm URI.voidTest blacklisted signature method algorithm URI.voidTest invalid signature, trusted signing credential.voidTest valid raw signature with whitelisted signature algorithm.voidTest invalid raw signature, trusted signing credential.voidTest valid raw signature, trusted signing credential.voidTest valid raw signature, untrusted signing credential.voidTest valid raw signature with whitelisted signature algorithm.voidTest valid signature.voidTest valid signature, untrusted signing credential.voidTest whitelisted signature and digest method algorithm URIs.Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElementMethods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
Field Details
-
signingCert
-
signingCertBase64
-
signingPrivateKey
-
signingPrivateKeyBase64
-
otherCert1
-
otherCert1Base64
-
credResolver
-
trustedCredentials
-
signingX509Cred
-
engine
-
criteriaSet
-
signingEntityID
-
rawAlgorithmURI
-
rawData
-
rawControlSignature
private byte[] rawControlSignature
-
-
Constructor Details
-
ExplicitKeySignatureTrustEngineTest
public ExplicitKeySignatureTrustEngineTest()Constructor.
-
-
Method Details
-
setUp
- Throws:
Exception
-
testSuccess
Test valid signature.- Throws:
SecurityException- ...
-
testUntrustedCredential
Test valid signature, untrusted signing credential.- Throws:
SecurityException- ...
-
testInvalidSignature
Test invalid signature, trusted signing credential.- Throws:
SecurityException- ...
-
testWhitelistedAlgorithms
Test whitelisted signature and digest method algorithm URIs.- Throws:
SecurityException- ...
-
testBlacklistedSignatureAlgorithm
Test blacklisted signature method algorithm URI.- Throws:
SecurityException- ...
-
testBlacklistedDigestAlgorithm
Test blacklisted digest method algorithm URI.- Throws:
SecurityException- ...
-
testRawSuccess
Test valid raw signature, trusted signing credential.- Throws:
SecurityException- ...
-
testRawUntrustedCredential
Test valid raw signature, untrusted signing credential.- Throws:
SecurityException- ...
-
testRawInvalidSignature
Test invalid raw signature, trusted signing credential.- Throws:
SecurityException- ...
-
testRawWhitelistedAlgorithm
Test valid raw signature with whitelisted signature algorithm.- Throws:
SecurityException- ...
-
testRawBlacklistedAlgorithm
Test valid raw signature with whitelisted signature algorithm.- Throws:
SecurityException- ...
-
getValidSignedObject
Get a signed object containing the signature to be validated.- Returns:
- a signed object
-
getInvalidSignedObject
Get a signed object containing the signature to be validated. Signature should be invalid when valid (i.e. signed content modified, etc ).- Returns:
- a signed object, with invalid signature
-
buildSignedObject
Build a signed object.- Returns:
- a signed object
- Throws:
SignatureException- ...
-