Class PKIXSignatureTrustEngineTest


  • public class PKIXSignatureTrustEngineTest
    extends org.opensaml.core.xml.XMLObjectBaseTestCase
    Tests the PKIXSignatureTrustEngine implementation.
    • Field Detail

      • EMPTY_CRLS

        private static final Set<X509CRL> EMPTY_CRLS
      • MAX_DEPTH

        private static final Integer MAX_DEPTH
      • engine

        private org.opensaml.xmlsec.signature.support.impl.PKIXSignatureTrustEngine engine
      • signature

        private org.opensaml.xmlsec.signature.Signature signature
      • criteriaSet

        private net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet
      • subjectCN

        private String subjectCN
      • tamperDocumentPostSigning

        private boolean tamperDocumentPostSigning
      • emitKeyInfo

        private boolean emitKeyInfo
      • emitKeyValueOnly

        private boolean emitKeyValueOnly
      • rawData

        private String rawData
      • rawSignedContent

        private byte[] rawSignedContent
      • rawAlgorithmURI

        private String rawAlgorithmURI
      • rawSignature

        private byte[] rawSignature
      • rawCandidateCred

        private org.opensaml.security.credential.Credential rawCandidateCred
    • Constructor Detail

      • PKIXSignatureTrustEngineTest

        public PKIXSignatureTrustEngineTest()
    • Method Detail

      • testGoodPathInAnchors

        public void testGoodPathInAnchors()
      • testGoodPathInCred

        public void testGoodPathInCred()
      • testGoodPathNoTrustedNames

        public void testGoodPathNoTrustedNames()
      • testGoodPathBadTrustedName

        public void testGoodPathBadTrustedName()
      • testCertRevoked

        public void testCertRevoked()
      • testCertExpired

        public void testCertExpired()
      • testMissingAnchor

        public void testMissingAnchor()
      • testNoAnchors

        public void testNoAnchors()
      • testTamperedData

        public void testTamperedData()
                              throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testNoCandidateCred

        public void testNoCandidateCred()
                                 throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testWrongCredType

        public void testWrongCredType()
                               throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testWhitelistedAlgorithms

        public void testWhitelistedAlgorithms()
      • testBlacklistedSignatureAlgorithm

        public void testBlacklistedSignatureAlgorithm()
      • testBlacklistedDigestAlgorithm

        public void testBlacklistedDigestAlgorithm()
      • testRawGoodPathInAnchors

        public void testRawGoodPathInAnchors()
                                      throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawGoodPathInCred

        public void testRawGoodPathInCred()
                                   throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawGoodPathNoTrustedNames

        public void testRawGoodPathNoTrustedNames()
                                           throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawGoodPathBadTrustedName

        public void testRawGoodPathBadTrustedName()
                                           throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawCertRevoked

        public void testRawCertRevoked()
                                throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawCertExpired

        public void testRawCertExpired()
                                throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawCertMissingAnchor

        public void testRawCertMissingAnchor()
                                      throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawCertNoAnchors

        public void testRawCertNoAnchors()
                                  throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawTamperedData

        public void testRawTamperedData()
                                 throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawNoCandidateCred

        public void testRawNoCandidateCred()
                                    throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawWrongCredType

        public void testRawWrongCredType()
                                  throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawWhitelistedAlgorithm

        public void testRawWhitelistedAlgorithm()
                                         throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testRawBlacklistedAlgorithm

        public void testRawBlacklistedAlgorithm()
                                         throws org.opensaml.security.SecurityException
        Throws:
        org.opensaml.security.SecurityException
      • testValidateSuccess

        private void testValidateSuccess​(String message)
      • testValidateFailure

        private void testValidateFailure​(String message)
      • getSignature

        private org.opensaml.xmlsec.signature.Signature getSignature​(String entityCertFileName,
                                                                     String entityKeyFileName,
                                                                     String... chainMembers)
      • getCredential

        private org.opensaml.security.x509.BasicX509Credential getCredential​(String entityCertFileName,
                                                                             String entityKeyFileName,
                                                                             String... chainMembers)
      • buildSignedObject

        private org.opensaml.xmlsec.signature.SignableXMLObject buildSignedObject​(org.opensaml.security.x509.X509Credential signingX509Cred)
                                                                           throws org.opensaml.xmlsec.signature.support.SignatureException
        Throws:
        org.opensaml.xmlsec.signature.support.SignatureException
      • testRawValidateSuccess

        private void testRawValidateSuccess​(String message)
      • testRawValidateFailure

        private void testRawValidateFailure​(String message)