1. official website https://www.openssl.org/
The current version is the use of OpenSSL 1.1.1c
2. Compile
① download, unzip, unzip assume the position as /home/openssl-1.1.1c
②./config
③make install
It will generate ssl libraries and crypto library
3. Code requires header files
#include <stdio.h>
#include <stdlib.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/pkcs12.h>
4. The need to link libraries (-L specific location of the specified library, to avoid interference problems plurality library function can not find the cause of the system!)
g++ *.cpp -L /home/openssl-1.1.1c -l ssl -l crypto
5. File Description type of relationship
① using the RSA private key generating function
②RSA private key used to generate the CSR function
③CSR request to the server to obtain CER (such as the Apple Developer CSR backstage after uploading files, you can download the corresponding CER file)
④CER function is transformed PEM (PEM to generate converted to P12)
⑤RSA private key + PEM using function generation P12
the above.
"One of the C ++ OpenSSL: compile and use"
, "C ++ OpenSSL II: generate RSA File"
"Three C ++ OpenSSL's: Generating a CSR file"
, "C ++ OpenSSL Four: CER converted to PEM"
"C ++ OpenSSL five: generate P12 file "