How to install and use OpenSSL encryption certificates in windows
OpenSSL encryption certificates are generally used for signature authentication, including private keys and public keys. In Linux, OpenSSL is generally installed and can be directly used. In Windows, installation and use are required.
We recently used OpenSSL when using the payment platform. The steps are as follows:
Install OpenSSL
1. Choose http://slproweb.com/products/win32openssl.htmlto download the required version.
2. Generally, the installation path is in the C root directory.
3. The path for generating the certificate is displayed during the installation process. You can choose either bin or bin by default.
Generate Certificate
1. Run cmd as an administrator after confirming that the installation is successful.
2. Go to the binfile directory under the OpenSSL installation directory, cmd: cd ~ : \ OpenSSL-Win64 \ bin (general path on disk C)
3. Generate the private key protected by des3 algorithm, cmd: openssl genrsa-des3-out private-rsa.key 1024
4. enter a password to protect the private key file. We recommend that you enter a password larger than 6 digits. Note: The password must be used when the public key is generated.
5. Generate public key, cmd: openssl req-new-x509-key private-rsa.key-days 750-out public-rsa.cer
6. You need to enter the password when the private key is generated during the public key generation process. Other steps can be ignored directly in the city, without affecting 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 public key certificate have been successfully generated. You can find them in the generated storage path selected during installation.
If you have any questions, please leave a message below. If you have any suggestions or comments, please correct them.