class Crypto {

    public static X509Certificate generateX509Certificate(PKCS10CertificationRequest certReq,
            PrivateKey caPrivateKey, X509Certificate caCertificate, int validityTimeout,
            boolean basicConstraints) {

        return generateX509Certificate(certReq, caPrivateKey,
                X500Name.getInstance(caCertificate.getSubjectX500Principal().getEncoded()),
                validityTimeout, basicConstraints);
    }

}