Code example for PKIXCertPathValidatorResult

Methods: getTrustAnchor

0
        if (ta == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor)");
        } 
 
        PKIXCertPathValidatorResult vr =
            new PKIXCertPathValidatorResult(
                    ta,
                    null, 
                    testPublicKey);
 
        // must return the same reference passed 
        // as a parameter to the constructor 
        assertSame(ta, vr.getTrustAnchor());
    } 
 
    /** 
     * Test for <code>getPublicKey()</code> method<br> 
     * Assertion: returns the subject's public key (never <code>null</code>) 
     * @throws NoSuchAlgorithmException 
     * @throws InvalidKeySpecException 
     */