signerKeystore.load(new FileInputStream(signerKeystorePath), signerPasswordArray);
Certificate signerCert = findCert(signerKeystore);
PrivateKey signerKey = findPrivateKey(signerKeystore, signerPasswordArray);
KeyPair kp = generateKeyPair();
X509CertificateObject cert = generateCert(keyName, kp, false, signerCert.getPublicKey(), signerKey);
char[] password = keystorePassword.toCharArray();
KeyStore keystore = KeyStore.getInstance(keystoreType);
keystore.load(null, null);
keystore.setCertificateEntry(keyName + "Cert", cert);