Change generateCertificate function to be not JVM vendor specific & add bouncycastle dependency