log.info("SubjectDN: "+cert.getSubjectDN().toString());
log.debug("SubjectDN: "+cert.getSubjectDN().toString());
    public void test01GetCertChain() throws Exception {        log.debug(">test01GetCertChain()");        KeyStore store = KeyStore.getInstance("PKCS12", "BC");        ByteArrayInputStream fis = new ByteArrayInputStream(ks3);        store.load(fis, storepwd.toCharArray());        Certificate[] certs = KeyTools.getCertChain(store, pkAlias);        log.info("Number of certs: "+certs.length);        assertEquals("Wrong number of certs returned", 3, certs.length);        for (int i =0;i<certs.length;i++) {            X509Certificate cert = (X509Certificate)certs[i];            log.info("SubjectDN: "+cert.getSubjectDN().toString());            if (i==0) assertEquals("Wrong subjectDN",cert.getSubjectDN().toString(), "CN=fooca,C=SE");            if (i==1) assertEquals("Wrong subjectDN",cert.getSubjectDN().toString(), "CN=TestSubCA,O=AnaTom,C=SE");            if (i==2) assertEquals("Wrong subjectDN",cert.getSubjectDN().toString(), "CN=TestCA,O=AnaTom,C=SE");        }        log.debug("<test01GetCertChain()");    }