// if generated self-signed certificate
if (p == 0) {
// check if the issuer and subject equal
assertEquals(errMsgPrefix + "unexpected principal. ", prnc,
issuerPrnc);
cert.verify(cert.getPublicKey());
} else { // if signed with certificate chain
// check if issuer name is "CN=selfSigned"
assertEquals(errMsgPrefix + "unexpected issuer name. ",
genKeyNoIssuerArgs[18], issuerPrnc.getName());
cert.verify(keyStore.getCertificate(genKeyNoIssuerArgs[8])