OpenSSL encryption certificates are typically used for signature authentication, including private and public keys. In Linux systems, OpenSSL is generally installed and can be used directly. In Windows systems, it is required to be installed.
When using the payment platform recently, OpenSSL was used to share the following steps:
Installing OpenSSL
1, to the official designated http://slproweb.com/products/Win32OpenSSL.html download the required version
2, general installation path in the C packing directory, can also choose their own
3, the installation process will appear the path of the generated certificate, can be the default to the bin, but also choose their own.
Generate certificate
1. After confirming the installation success, run CMD as Administrator
2. Jump to the bin file directory in the OpenSSL installation directory, cmd:cd ~:\openssl-win64\bin(general path in C drive)
3. Generate private key protected with Des3 algorithm, cmd:OpenSSL genrsa-des3-out private-rsa.key 1024x768
4. Enter the password that is used to protect the private key file, and it is recommended to enter a password greater than 6 digits. Note: The password here needs to be used when generating the public key
5. generate public key, cmd:OpenSSL req-new-x509-key private-rsa.key-days 750-out public-rsa.cer
6, in the process of generating a public key need to enter the password just generated when the private key, the other steps can be directly to the town to ignore, does not affect normal use.
7. Generate PKCS12 format keystore,cmd: OpenSSL pkcs12-export-name test-alias-in public-rsa.cer-inkey private-rsa.key-out user-rsa.pfx
At this point, the private key certificate and the public key certificate have been successfully generated and can be found in the build storage path selected at installation time.
If you encounter any problems, please leave a message below; If you have any suggestions and opinions, please correct me.
Windows OpenSSL encryption certificate installation steps and how to use