How to load a PKCS#12 file in OpenSSL programmatically?

后端 未结 3 799
失恋的感觉
失恋的感觉 2020-11-29 10:38

In an SSL Server Application based on OpenSSL, how can we load a PKCS#12 file programmatically?

Also, can I load a PKCS#12 file having Certificate, Key & CAs in

3条回答
  •  天命终不由人
    2020-11-29 10:41

    Try man SSL, which gives you a list of OpenSSL functions. Something like SSL_load_client_CA_file might suit your needs; it depends if the certificate is in a file on disk or already in memory. There are lots of helper functions, one of them will do the trick. Also check out man PEM for PEM handling routines.

    Edit: Hm, maybe a combination of d2i_PKCS12_fp and PKCS12_parse (both available from ) lets you read a certificate from file and parse it.

提交回复
热议问题