I can't use that API from Vertx. This is what we are suppose to do.
1 - During installation our app connects to remote server to checks if remote server is using the self-signed cert, it prompts the details of remote server's self-signed certs.
2 - Person doing the installation will review the self-signed certs from remote server, and stop/continue the installation if they trust the remote certs.
3 - If self-signed certs from remote server are accepted then our app should create JKS/PEM truststore, and start with the app with the generated trust-store. This should allow the app to do successful SSL handshake since the remote server certs are provided as truststore.
That's the reason we can't use Vertx's API to generate the self-signed certs.