I have a certificate in a PEM file.
I want to construct a CMPCertificate from this file. So I have to build an org.bouncycastle.asn1.x509.Certificate in order to call CMPCertificate.getInstance(..).
How could I convert a PEM file or a java.security.cert.Certificate to org.bouncycastle.asn1.x509.Certificate?
After verifying the source code (since the documentation is missing on the subject) the
getInstancemethod onCMPCertificateacceptsbyte[]type.This code should work: