PEM 格式
1. FILE *fp = fopen("xx.pem", "r");
2. X509 *cert = PEM_read_X509(fp, NULL, NULL, NULL);
3. EVP_PKEY *pkey = X509_get_pubkey(cert)
der 格式
1. FILE *fp = fopen("xx.cer", "r");
2. X509 *cert = d2i_X509_fp(fp, NULL);
3. EVP_PKEY *pkey = X509_get_pubkey(cert)
PEM 用記事本可以打開查看 為 base64 編碼
der 是二進(jìn)制格式,用記事本打開為亂碼