Tuesday, July 23, 2013

Installing OpenSSL on Windows


OpenSSL is officially distributed in C source code format. This is not a problem for Unix systems where C compiler is always available. But if you have a Windows system, you will have a hard time to install OpenSSL in C source code format. What you should do is to find a pre-compiled binary version for Windows. Here is my sugge I installed OpenSSL on my Windows system: 

1. Go to http://gnuwin32.sourceforge.net/packages/openssl.htm, and download the "Zip" version. 

2. Unzip the file somewhere on your computer. 

3. Copy all the libeay32.dll and ssleay32.dll to your Windows\System32 or xampp/php (if you are using xampp server) directory. If you've dealt with SSL at all before, especially as a developer, you might already have copies of these there. Keep whatever is newest.

4. Open command line window, and try the following command: 
Code:
>\local\gnuwin32\bin\openssl -help
openssl:Error: '-help' is an invalid command.

Standard commands
asn1parse      ca             ciphers        crl            crl2pkcs7
dgst           dh             dhparam        dsa            dsaparam
enc            engine         errstr         gendh          gendsa
genrsa         nseq           ocsp           passwd         pkcs12
pkcs7          pkcs8          rand           req            rsa
rsautl         s_client       s_server       s_time         sess_id
smime          speed          spkac          verify         version
x509
......
5. You'll also need an openssl.cnf which is an OpenSSL configuration file that, for some reason, doesn't come with Hunter's distribution. Download this one or this one or this one or this one and save it to the folder where you unzipped OpenSSL.

If you see the list of commands printed by OpenSSL, you know that your installation is done correctly.

------------ 
For other tutorials on OpenSSL, see http://www.herongyang.com/crypto/

__________________
Good tutorials for beginners on PHP, JSP, ASP, SQL, ... 
--> http://www.herongyang.com/

No comments:

Post a Comment