org.opensaml.xml.signature
public class PKIXSignatureTrustEngineTest extends XMLObjectBaseTestCase
PKIXSignatureTrustEngine
implementation.Modifier and Type | Field and Description |
---|---|
private org.opensaml.xml.security.CriteriaSet |
criteriaSet |
private static String |
DATA_PATH |
private boolean |
emitKeyInfo |
private boolean |
emitKeyValueOnly |
private static Set<X509Certificate> |
EMPTY_ANCHORS |
private static Set<X509CRL> |
EMPTY_CRLS |
private org.opensaml.xml.signature.impl.PKIXSignatureTrustEngine |
engine |
private static Integer |
MAX_DEPTH |
private String |
rawAlgorithmURI |
private org.opensaml.xml.security.credential.Credential |
rawCandidateCred |
private String |
rawData |
private byte[] |
rawSignature |
private byte[] |
rawSignedContent |
private org.opensaml.xml.signature.Signature |
signature |
private String |
subjectCN |
private boolean |
tamperDocumentPostSigning |
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
JAVA5_XSLTC_FACTORY_NAME, XSLT_END, XSLT_IDENTITY_TEMPLATE, XSLT_START, XSLT_START_NO_VERSION, XSLT_STRIP_COMMENTS_TEMPLATE, XSLT_STRIP_WHITESPACE, XSLT_XML_OUTPUT_NOINDENT
CLOSE_NODE, END_CDATA, END_COMMENT, END_PROCESSING_INSTRUCTION, OPEN_END_NODE, OPEN_START_NODE, START_CDATA, START_COMMENT, START_DOCTYPE, START_PROCESSING_INSTRUCTION, W3C_XML_SCHEMA_INSTANCE_NO_NAMESPACE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_INSTANCE_NS_URI, W3C_XML_SCHEMA_INSTANCE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_NS_URI, XML_DECLARATION, XMLNS_PREFIX, XPATH_ATTRIBUTE_IDENTIFIER, XPATH_CHARACTER_NODE_IDENTIFIER, XPATH_COMMENT_IDENTIFIER, XPATH_NODE_INDEX_END, XPATH_NODE_INDEX_START, XPATH_PROCESSING_INSTRUCTION_IDENTIFIER, XPATH_SEPARATOR
Constructor and Description |
---|
PKIXSignatureTrustEngineTest() |
Modifier and Type | Method and Description |
---|---|
private org.opensaml.xml.signature.SignableXMLObject |
buildSignedObject(org.opensaml.xml.security.x509.X509Credential signingX509Cred) |
private X509Certificate |
getCertificate(String fileName) |
private Collection<X509Certificate> |
getCertificates(String... certNames) |
private org.opensaml.xml.security.x509.BasicX509Credential |
getCredential(String entityCertFileName,
String entityKeyFileName,
String... chainMembers) |
private X509CRL |
getCRL(String fileName) |
private Collection<X509CRL> |
getCRLS(String... crlNames) |
private org.opensaml.xml.signature.impl.PKIXSignatureTrustEngine |
getEngine(Collection<X509Certificate> certs,
Collection<X509CRL> crls,
Integer depth,
String... trustedNames) |
private InputStream |
getInputStream(String fileName) |
private org.opensaml.xml.security.x509.PKIXValidationInformation |
getPKIXInfoSet(Collection<X509Certificate> certs,
Collection<X509CRL> crls,
Integer depth) |
private PrivateKey |
getPrivateKey(String fileName) |
private org.opensaml.xml.signature.Signature |
getSignature(String entityCertFileName,
String entityKeyFileName,
String... chainMembers) |
protected void |
setUp() |
void |
testCertExpired() |
void |
testCertRevoked() |
void |
testGoodPathBadTrustedName() |
void |
testGoodPathInAnchors() |
void |
testGoodPathInCred() |
void |
testGoodPathNoTrustedNames() |
void |
testMissingAnchor() |
void |
testNoAnchors() |
void |
testNoCandidateCred() |
void |
testRawCertExpired() |
void |
testRawCertMissingAnchor() |
void |
testRawCertNoAnchors() |
void |
testRawCertRevoked() |
void |
testRawGoodPathBadTrustedName() |
void |
testRawGoodPathInAnchors() |
void |
testRawGoodPathInCred() |
void |
testRawGoodPathNoTrustedNames() |
void |
testRawNoCandidateCred() |
void |
testRawTamperedData() |
private void |
testRawValidateFailure(String message) |
private void |
testRawValidateSuccess(String message) |
void |
testRawWrongCredType() |
void |
testTamperedData() |
private void |
testValidateFailure(String message) |
private void |
testValidateSuccess(String message)
Helper methods.
|
void |
testWrongCredType() |
assertEquals, assertEquals, buildXMLObject, printXML, printXML, unmarshallElement
assertNodeTestPasses, assertNodeTestPasses, assertNodeTestPasses, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLIdentical, assertXMLIdentical, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXpathEvaluatesTo, assertXpathEvaluatesTo, assertXpathEvaluatesTo, assertXpathExists, assertXpathExists, assertXpathExists, assertXpathNotExists, assertXpathNotExists, assertXpathNotExists, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, compareXML, compareXML, compareXML, compareXML, compareXML, compareXML
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, tearDown, toString
private static final String DATA_PATH
private static final Set<X509Certificate> EMPTY_ANCHORS
private static final Integer MAX_DEPTH
private org.opensaml.xml.signature.impl.PKIXSignatureTrustEngine engine
private org.opensaml.xml.signature.Signature signature
private org.opensaml.xml.security.CriteriaSet criteriaSet
private String subjectCN
private boolean tamperDocumentPostSigning
private boolean emitKeyInfo
private boolean emitKeyValueOnly
private String rawData
private byte[] rawSignedContent
private String rawAlgorithmURI
private byte[] rawSignature
private org.opensaml.xml.security.credential.Credential rawCandidateCred
protected void setUp() throws Exception
setUp
in class XMLObjectBaseTestCase
Exception
public void testGoodPathInAnchors()
public void testGoodPathInCred()
public void testGoodPathNoTrustedNames()
public void testGoodPathBadTrustedName()
public void testCertRevoked()
public void testCertExpired()
public void testMissingAnchor()
public void testNoAnchors()
public void testTamperedData() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testNoCandidateCred() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testWrongCredType() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawGoodPathInAnchors() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawGoodPathInCred() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawGoodPathNoTrustedNames() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawGoodPathBadTrustedName() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawCertRevoked() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawCertExpired() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawCertMissingAnchor() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawCertNoAnchors() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawTamperedData() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawNoCandidateCred() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testRawWrongCredType() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
private void testValidateSuccess(String message)
private void testValidateFailure(String message)
private org.opensaml.xml.signature.Signature getSignature(String entityCertFileName, String entityKeyFileName, String... chainMembers)
private org.opensaml.xml.security.x509.BasicX509Credential getCredential(String entityCertFileName, String entityKeyFileName, String... chainMembers)
private org.opensaml.xml.signature.impl.PKIXSignatureTrustEngine getEngine(Collection<X509Certificate> certs, Collection<X509CRL> crls, Integer depth, String... trustedNames)
private org.opensaml.xml.security.x509.PKIXValidationInformation getPKIXInfoSet(Collection<X509Certificate> certs, Collection<X509CRL> crls, Integer depth)
private Collection<X509Certificate> getCertificates(String... certNames)
private PrivateKey getPrivateKey(String fileName)
private X509Certificate getCertificate(String fileName)
private Collection<X509CRL> getCRLS(String... crlNames)
private InputStream getInputStream(String fileName)
private org.opensaml.xml.signature.SignableXMLObject buildSignedObject(org.opensaml.xml.security.x509.X509Credential signingX509Cred) throws org.opensaml.xml.signature.SignatureException
org.opensaml.xml.signature.SignatureException
private void testRawValidateSuccess(String message)
private void testRawValidateFailure(String message)
Copyright © 1999-2014 JBoss by Red Hat. All Rights Reserved.