Openssl 如何从pem文件生成X509?

Openssl 如何从pem文件生成X509?,openssl,Openssl,我知道有一些方法可以从X509证书保存pem文件,如 PEM_write_X509( f, /* write the certificate to the file we've opened */ ce /* our certificate */ ); 我可以通过pem文件生成一个X509吗?调用pem\u write\u X509与此相反 X509 *x = NULL; if (!PEM_read_bio_X509(bp, &x, 0, NU

我知道有一些方法可以从X509证书保存pem文件,如

PEM_write_X509(
        f,   /* write the certificate to the file we've opened */
        ce /* our certificate */
);

我可以通过pem文件生成一个X509吗?

调用pem\u write\u X509与此相反

 X509 *x = NULL;

 if (!PEM_read_bio_X509(bp, &x, 0, NULL))
     /* Error */