Code example for PKIXCertPathValidatorResult

Methods: getPublicKey

0
            fail(getName() + ": not performed (could not create test TrustAnchor)");
        } 
 
        PublicKey pk = testPublicKey;
        PKIXCertPathValidatorResult vr =
            new PKIXCertPathValidatorResult(
                    ta,
                    null, 
                    pk);
 
        // must return the same reference passed 
        // as a parameter to the constructor 
        assertSame(pk, vr.getPublicKey());
    } 
 
    /** 
     * Test for <code>getPolicyTree()</code> method<br> 
     * Assertion: returns the root node of the valid 
     * policy tree or <code>null</code> if there are 
     * no valid policies 
     * @throws NoSuchAlgorithmException