Code example for CertPathValidatorException

0
    } 
 
    @Override 
    public void init(boolean forward) throws CertPathValidatorException {
        if (forward) {
            throw new CertPathValidatorException("Forward checking is not supported");
        } 
    } 
 
    /** 
     * Forward checking is not supported. Certificates should be passed from the most trusted CA certificate 
     * to the target certificate. This is the default implementation of the Path validator used 
     * CertPathValidator.getInstance("PKIX", "BC") in CertificatePathValidator; 
     */ 
    @Override 
    public boolean isForwardCheckingSupported() { 
        return false; 
    } 
 
    @Override 
    public Set<String> getSupportedExtensions() {