download and installation and use of OpenSSL under Windows
There are two ways to install OpenSSL, the first to directly download the installation package, installed on the run, the second can download the source code, build it yourself. Both methods are described in detail below.
First, download and install Openss
Method One: Use the OpenSSL installation package directly
The installation package for the OpenSSL of Window is:
Http://slproweb.com/products/Win32OpenSSL.html
Some plugins for VS are usually required before installing OpenSSL , which also provides downloads for the relevant plugins. such as the installation of OpenSSL and its vs plugin on the download page.
Ii. using OpenSSL to generate CAs and certificates
generate the corresponding certificate using an executable such as the openssl.exe generated by the OpenSSL that you just compiled , with the same command as the process of generating a CA and signing certificate under Linux (see the article "Mosquito How to use SSL/TLS for Secure communication , the address is:
http://blog.csdn.net/houjixin/article/details/24305613
Or:
http://houjixin.blog.163.com/blog/static/35628410201432205042955/
)。 The following will use a ready- made CA Files (ca.key and ca.crt) generate certificate Files (Client.key and client.crt):
1) Create a directory to hold the CA file and the certificate file that will be generated, in this case the directory is created in the out32dll directory:C:\Program files\openssl-1.0.1g\out32dll\test,
2) Execute the command to generate the certificate for the key file:.. \openssl genrsa-out client.key 2048,
3) Generate certificate Request file:.. \OpenSSL req-out server.csr-key server.key-new
4) Generate certificate file:.. \ OpenSSL x509-req-in client.csr-ca ca.crt-cakey ca.key-cacreateserial-out client.crt-days 36500
Warning:can ' t open config file:/usr/local/ssl/openssl.cnf error in req
Tip No openssl.cnf found, no relationship Add environment variable openssl_conf before entering the OpenSSL command.
Set OPENSSL_CONF=OPENSSL.CNF
The OPENSSL.CNF default configuration is generally used without modification. The openssl.cnf file is in the bin directory, but the sample file is usually suffixed with. CFG or. example, which can be changed.
Download and installation and use of OpenSSL under Windows