Workaround for CertAndKeyGen class in JDK8