Thursday, October 29, 2009

Build OpenSSL on Windows XP

After days of not being able to build OpenSSL on Windows XP, I found this great article:
A Free OpenSSL Visual C++ Object: Part 2 by Stephen Rives.

First, I installed Microsoft Visual C++ 9.0 Express Edition which you can find it here: Visual C++ Express Edition

Second, I have downloaded OpenSSL version 0.9.8j. You can find OpenSSL for download from different mirrors, in here Download OpenSSL. After download, extract the files in a folder on your hard disk. I used C:\openssl-0.9.8j directory for extraction.

Third, you will need also Perl. I have installed Strawberry Perl 5.10.0.6, which has an executable for Windows, thanks to Larry Wall. Just take it from here: Perl for Windows

Then, Mr. Rives provides us with a great file for building OpenSSL. Download VC_BUILD.CMD here.

You must put VC_BUILD.CMD where you installed OpenSSL. In my case, it is here:

C:\openssl-0.9.8j\vc_build.cmd

You will need to change two lines. One path will point to your OpenSSL folder, where you extracted the files in the first place and one path will point to the folder where you installed visual C++. These are the two paths that you need to modify:

set MY_PATH=C:/openssl-0.9.8j

set VCVARS="C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"

After this, open up the command prompt window and browse to your openssl folder, where you put the vc_build.cmd file . Now, just run vc_build:

vc_build

Go get a coffee :)
If everything works well, after the building finishes, you will find all the DLLs and LIBs in the out32dll folder (inside your openssl directory).

No comments:

Post a Comment