public static void generateHostCert(File keystore, String password, String host, int validity) throws IOException {
        // generate the keypair for the host
        generateSignedCert(keystore, password, validity,
                host,  // alias
                host); // subject
    }
@Test
    public void testIPBasedCert() throws Exception {
        KeyToolUtils.generateHostCert(keystore, password, "10.1.2.3", validity);
    }