public class ExplicitKeySignatureTrustEngineTest extends XMLObjectBaseTestCase
| Modifier and Type | Field and Description |
|---|---|
private CollectionCredentialResolver |
credResolver |
private net.shibboleth.utilities.java.support.resolver.CriteriaSet |
criteriaSet |
private org.opensaml.xmlsec.signature.support.impl.ExplicitKeySignatureTrustEngine |
engine |
private X509Certificate |
otherCert1 |
private String |
otherCert1Base64 |
private String |
rawAlgorithmURI |
private byte[] |
rawControlSignature |
private String |
rawData |
private X509Certificate |
signingCert |
private String |
signingCertBase64 |
private String |
signingEntityID |
private PrivateKey |
signingPrivateKey |
private String |
signingPrivateKeyBase64 |
private BasicX509Credential |
signingX509Cred |
private List<org.opensaml.security.credential.Credential> |
trustedCredentials |
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory| Constructor and Description |
|---|
ExplicitKeySignatureTrustEngineTest()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.opensaml.xmlsec.signature.SignableXMLObject |
buildSignedObject()
Build a signed object.
|
protected org.opensaml.xmlsec.signature.SignableXMLObject |
getInvalidSignedObject()
Get a signed object containing the signature to be validated.
|
protected org.opensaml.xmlsec.signature.SignableXMLObject |
getValidSignedObject()
Get a signed object containing the signature to be validated.
|
protected void |
setUp() |
void |
testBlacklistedDigestAlgorithm()
Test blacklisted digest method algorithm URI.
|
void |
testBlacklistedSignatureAlgorithm()
Test blacklisted signature method algorithm URI.
|
void |
testInvalidSignature()
Test invalid signature, trusted signing credential.
|
void |
testRawBlacklistedAlgorithm()
Test valid raw signature with whitelisted signature algorithm.
|
void |
testRawInvalidSignature()
Test invalid raw signature, trusted signing credential.
|
void |
testRawSuccess()
Test valid raw signature, trusted signing credential.
|
void |
testRawUntrustedCredential()
Test valid raw signature, untrusted signing credential.
|
void |
testRawWhitelistedAlgorithm()
Test valid raw signature with whitelisted signature algorithm.
|
void |
testSuccess()
Test valid signature.
|
void |
testUntrustedCredential()
Test valid signature, untrusted signing credential.
|
void |
testWhitelistedAlgorithms()
Test whitelisted signature and digest method algorithm URIs.
|
assertXMLEquals, assertXMLEquals, buildXMLObject, fetchDuration, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElementinitOpenSAMLprivate X509Certificate signingCert
private String signingCertBase64
private PrivateKey signingPrivateKey
private String signingPrivateKeyBase64
private X509Certificate otherCert1
private String otherCert1Base64
private CollectionCredentialResolver credResolver
private List<org.opensaml.security.credential.Credential> trustedCredentials
private BasicX509Credential signingX509Cred
private org.opensaml.xmlsec.signature.support.impl.ExplicitKeySignatureTrustEngine engine
private net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet
private String signingEntityID
private String rawAlgorithmURI
private String rawData
private byte[] rawControlSignature
public ExplicitKeySignatureTrustEngineTest()
public void testSuccess()
throws SecurityException
SecurityExceptionpublic void testUntrustedCredential()
throws SecurityException
SecurityExceptionpublic void testInvalidSignature()
throws SecurityException
SecurityExceptionpublic void testWhitelistedAlgorithms()
throws SecurityException
SecurityExceptionpublic void testBlacklistedSignatureAlgorithm()
throws SecurityException
SecurityExceptionpublic void testBlacklistedDigestAlgorithm()
throws SecurityException
SecurityExceptionpublic void testRawSuccess()
throws SecurityException
SecurityExceptionpublic void testRawUntrustedCredential()
throws SecurityException
SecurityExceptionpublic void testRawInvalidSignature()
throws SecurityException
SecurityExceptionpublic void testRawWhitelistedAlgorithm()
throws SecurityException
SecurityExceptionpublic void testRawBlacklistedAlgorithm()
throws SecurityException
SecurityExceptionprotected org.opensaml.xmlsec.signature.SignableXMLObject getValidSignedObject()
protected org.opensaml.xmlsec.signature.SignableXMLObject getInvalidSignedObject()
protected org.opensaml.xmlsec.signature.SignableXMLObject buildSignedObject()
throws org.opensaml.xmlsec.signature.support.SignatureException
org.opensaml.xmlsec.signature.support.SignatureExceptionCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.