Q: Is it possible to read a RSA key pair from a Java Key Store can capture the public key subject identity from the public key?
I've generated a RSA with SHA1 2048 bit key using the Java Keytool and stored the key pair in a JKS file. I can load the key using the code from here: https://stackoverflow.com/a/26711907/1203182 however I'm getting an RSAPublicKey, not an X509Certificate. The RSA Public Key doesn't have any methods to find the Subject Identity or DN from the public key.
Is there a way to convert the RSA Public Key or somehow derive the X509 certificate from it? Or maybe I'm just not understanding something.