How to read public key from PFX file in java
- by articlestack
I am able to read private key from PFX file but not public key. I am using following code to read public key.
InputStream inStream = new FileInputStream(certFile);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
BufferedInputStream bis = new BufferedInputStream(inStream);
// if (bis.available() > 0) {…