I am trying to use Java to read a certificate that I received from an external party. The code is throwing the following error:
java.lang.RuntimeExcep
Try to type this using openssl, and then import the result:
openssl x509 -outform der -in certificate.pem -out certificate.der
or use the Java Bouncy Castle functionality in the lightweight API:
http://www.bouncycastle.org/docs/pkixdocs1.5on/org/bouncycastle/openssl/PEMReader.html
You may encode the result again and then use the default CertificateBuilder in Java to get a JCE defined certificate.