jsdsi.test
Class CertPathTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--jsdsi.test.CertPathTest
All Implemented Interfaces:
junit.framework.Test

public class CertPathTest
extends junit.framework.TestCase

Tests the cert path builder and validator. For each pair of files called "certs.inX" and "certs.outX" (for any string X, including the empty string) in the local directory, this test runs the following suite:

First, this test loads the certificates in certs.inX into a CertStore using a Loader. Then, for each local name N and each key K defined in certs.inX, this test attempts to build a cert path that proves (N -> K) using FProver (i.e. IssuerCertPathParameters). If such a path exists, it must appear in certs.outX; if a path does not exist, it must not appear in certs.outX.

Then, for each pair of keys K and K' and each tag T in certs.inX, this test attempts to build a cert path using FProver that proves (K !T -> K') and (K +T -> K') (i.e., K grants the authorization T to K', with and without permission to propagate it). As above, certs.outX must contain (or not contain) the resulting path.

Then, the above two suites are repeated using RProver.

Author:
Sameer Ajmani
See Also:
Loader

Field Summary
(package private)  java.security.cert.CertPathBuilder builder
           
(package private)  CertPathParameters params
           
(package private)  java.security.cert.CertPathValidator validator
           
 
Constructor Summary
CertPathTest(java.lang.String name, java.security.cert.CertPathBuilder b, java.security.cert.CertPathValidator v, CertPathParameters p)
           
 
Method Summary
static junit.framework.Test suite()
           
 void testCycle()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

builder

java.security.cert.CertPathBuilder builder

validator

java.security.cert.CertPathValidator validator

params

CertPathParameters params
Constructor Detail

CertPathTest

public CertPathTest(java.lang.String name,
                    java.security.cert.CertPathBuilder b,
                    java.security.cert.CertPathValidator v,
                    CertPathParameters p)
Method Detail

testCycle

public void testCycle()
               throws java.security.InvalidAlgorithmParameterException
java.security.InvalidAlgorithmParameterException

suite

public static junit.framework.Test suite()