Class CertPathValidatorTest


  • public class CertPathValidatorTest
    extends java.lang.Object
    This test class can be used to validate the CertPathValidator low-level implementation.

    The PKI used for tests is the following:

         A*----
        / \    \
       B   C*   F*°
      /   / \    \
     H   D   E°   G
    
     * → Certification Authority
     ° → Expired certificate
     

    pki/generate-pki.sh generates these certificates.

    • Constructor Detail

      • CertPathValidatorTest

        public CertPathValidatorTest()
    • Method Detail

      • setUpClass

        public static void setUpClass()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertificateFactoryGenerateCertPath

        public void testCertificateFactoryGenerateCertPath()
                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathGetType

        public void testCertPathGetType()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorEmptyPathEmptyTrustStore

        public void testCertPathValidatorEmptyPathEmptyTrustStore()
                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorEmptyPathSingletonTrustStore

        public void testCertPathValidatorEmptyPathSingletonTrustStore()
                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorSingletonPathSameSingletonTrustStore

        public void testCertPathValidatorSingletonPathSameSingletonTrustStore()
                                                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorSingletonPathChildSingletonTrustStore

        public void testCertPathValidatorSingletonPathChildSingletonTrustStore()
                                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorSingletonPathParentCASingletonTrustStore

        public void testCertPathValidatorSingletonPathParentCASingletonTrustStore()
                                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorSingletonPathParentNonCASingletonTrustStore

        public void testCertPathValidatorSingletonPathParentNonCASingletonTrustStore()
                                                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorInvalidChainPathUnrelatedCertificates

        public void testCertPathValidatorInvalidChainPathUnrelatedCertificates()
                                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorInvalidChainPathWithCATrusted

        public void testCertPathValidatorInvalidChainPathWithCATrusted()
                                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorInvalidChainPathWrongOrder

        public void testCertPathValidatorInvalidChainPathWrongOrder()
                                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorInvalidChainPathWrongOrder2

        public void testCertPathValidatorInvalidChainPathWrongOrder2()
                                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorValidChainPathIncludingCASingletonTrustStore1

        public void testCertPathValidatorValidChainPathIncludingCASingletonTrustStore1()
                                                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorValidChainPathIncludingCASingletonTrustStore2

        public void testCertPathValidatorValidChainPathIncludingCASingletonTrustStore2()
                                                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorValidChainPathExcludingCASingletonTrustStore

        public void testCertPathValidatorValidChainPathExcludingCASingletonTrustStore()
                                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCertPathValidatorValidChainPathIncludingNonCASingletonTrustStore

        public void testCertPathValidatorValidChainPathIncludingNonCASingletonTrustStore()
                                                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception