Is there any OpenSSL function to convert PKCS7 file to PEM

后端 未结 1 489
旧巷少年郎
旧巷少年郎 2020-12-19 20:32

Is there any openssl api function to convert PKCS7 file to PEM. I am able to convert a PKCS12 file to PEM using PKCS12_parse() function which returns key and certificate giv

相关标签:
1条回答
  • 2020-12-19 21:02

    After some googling I am able to do that.

    if(p7->d.sign->cert != NULL){
        PEM_write_X509(fp, sk_X509_value(p7->d.sign->cert, 0)); 
    }
    

    where p7 is a pointer to pkcs7 struct and fp is the file pointer to PEM file

    0 讨论(0)
提交回复
热议问题