public void verify(CvCertificate cert) {
        final Deque<CvCertificate> chain = getTrustChain(cert);

        // Only CVCA has domain parameters
        final ECDomainParameters params = chain.getLast().getBody().getPublicKey().getParams();

        while (!chain.isEmpty()) {
            final CvCertificate signer = chain.pop();
            signatureService.verify(cert, signer.getBody().getPublicKey(), params);
            cert = signer;
        }
    }
@Test
    public void shouldVerifyIfRootIsTrustedWithIntermediate() throws Exception {
        certificateRepo.save(loadCvCertificate("rdw/acc/cvca.cvcert", true));
        certificateRepo.save(loadCvCertificate("rdw/acc/dvca.cvcert", false));
        certificateRepo.flush();
        service.verify(readCvCertificate("rdw/acc/at001.cvcert"));
    }