Not possible without major rewrite: You would have to pass the entire CertPath and index down the call chain.