Change generateCertificate function to be not JVM vendor specific