I had the same problem, missing public key.
I found that I had to set the environment variable OPENSSL_CONF in the advanced settings tab of system properties.
I also set $CFG->opensslcnf in the config.php file.
It refused to work.
What I needed to do was set the OPENSSL_CONF only and NOT set the $CFG->opensslcnf variable.
Once I did that, I managed to generate the public keys