OpenSSL on VS.NET

I know how to build OpenSSL on Visual Studio .NET!!! So can you.

Ingredients:

One Windows machine with VS.NET (my version is 2002, a.k.a. 7.0)
One Linux machine (mine is Fedora Core 1)
One tarball of OpenSSL 0.9.7c.

  1. Untar on the Windows machine to somewhere.
  2. If you want to build with MASM or NASM, follow the instructions in INSTALL.W32 at least all the way up to the part where you run ms\do_nasm.bat or ms\do_masm.bat. If you're building the straight C version, skip this step.
  3. Untar on the Linux machine to somewhere.
  4. On Linux, in the openssl directory you just untarred:
    1. perl Configure VC-WIN32
    2. cd ms/
    3. tr -d '\15\32' < do_ms.bat > build.tmp (or do_masm.bat or do_nasm.bat)
    4. tr '\\' '/' < build.tmp > build_mak.sh
    5. chmod +x build_mak.sh
    6. cd ..
    7. ./ms/build_mak.sh
  5. Copy ms/*.mak and ms/*.def to the Windows machine's openssl-0.9.7c\ms directory, overwriting the existing files already in that directory.
  6. On the Windows machine:
    1. Find vsvars32.bat, which should be in C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools. Copy that file to your openssl directory (this step isn't completely necessary but it makes things easier later).
    2. Open a DOS prompt (NOT a Cygwin shell!).
    3. cd to your openssl directory.
    4. run vsvars32.bat.
    5. Now, nmake -f ms\ntdll.mak (or whichever you want).

It should now build according to the instructions in INSTALL.W32 (with stuff ending up in the out32 or out32dll directory). OpenSSL's build scripts on Windows seem to have CRLF problems. Based on this, I'm sure it's possible to build without the Linux step. But this worked for me, and now I have a working OpenSSL binary for Windows!

Categories

About this Entry

This page contains a single entry by Mike Tsao published on February 3, 2004 8:54 PM.

Tiny computer was the previous entry in this blog.

Easier way to build OpenSSL is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.2rc2-en