harness.check(k2, k1, "In-memory and original public key MUST be equal");
// store a certificate
CertificateFactory x509Factory = CertificateFactory.getInstance("X.509");
byte[] certificateBytes = SELF_SIGNED_CERT.getBytes("ASCII");
ByteArrayInputStream bais = new ByteArrayInputStream(certificateBytes);
Certificate certificate = x509Factory.generateCertificate(bais);
Certificate[] chain1 = new Certificate[] { certificate };
kr1.putCertPath(ALIAS, chain1);
// retrieve the same certificate path
Certificate[] chain2 = kr1.getCertPath(ALIAS);
harness.check(Arrays.equals(chain2, chain1),