how to get public key from truststorein begin and end certificate java code example
Example: java read public key from keystore
KeyStore ks = KeyStore.getInstance("AndroidKeyStore");
ks.load(null);
PublicKey publicKey = ks.getCertificate("aliasYouChose").getPublicKey();