Building openSSL 0.9.8j on Windows
Information/Programming :
2009. 2. 2. 14:25
** This post is based on http://crowback.tistory.com/entry/openssl-098i-버전-윈도우-환경하에서-컴파일하기 and INSTALL.W32 (plain text file that comes with the openSSL source)
The requirements...
My build evironment...
1. Downloading Source Files and Extracting it
Download Openssl-0.9.8j.tar.gz from http://www.openssl.org/source/ and extract it to a dedicated folder. In my case D:\Work\openssl-0.9.8j.
(tar.gz files open beautifully with 7-zip, which is a freeware that supports unpacking almost every compression format widely used these days)
2. Configure
Execute "Configure" perl script by typing the following in the command prompt, where the prefix argument specifies where openSSL will be installed. In my case c:\openssl.
> perl Configure VC-WIN32 --prefix=c:\openssl
3. Add Assembly Functions
Add assembly functions (really don't know what it means at the moment) by typing the following from the command prompt.
> ms\do_masm
4. Make the following modifications to files
I had to build openSSL on Windows platform at work. Since it's not something that will work simply as opening a solution file on visual studio and building it, I'm keeping a record on how I did it. Not that this is something really difficult, I hope this information can become handy for the ones who really need it.
The requirements...
- cl (Microsoft c/c++ compiler)
- ml (MASM - Microsoft macro assember)
- perl
- ml (MASM - Microsoft macro assember)
- perl
My build evironment...
- cl: Visual C++ 2005 express (can download here)
- ml: Microsoft macro assember 8 (can download MASM here)
- perl: v5.10.0 built for cygwin-thread-multi-64int (can download cygwin here)
- ml: Microsoft macro assember 8 (can download MASM here)
- perl: v5.10.0 built for cygwin-thread-multi-64int (can download cygwin here)
* Prior to building openSSL, check if cl and ml can be executed from command prompt by simply typing 'cl' and 'ml'. If cl and ml is properly executed, you can see the version and usage of cl or ml you are executing. If it seems like cl and ml is not being executed properly, refer to the following by extending "더보기".
1. Downloading Source Files and Extracting it
Download Openssl-0.9.8j.tar.gz from http://www.openssl.org/source/ and extract it to a dedicated folder. In my case D:\Work\openssl-0.9.8j.
(tar.gz files open beautifully with 7-zip, which is a freeware that supports unpacking almost every compression format widely used these days)
2. Configure
Execute "Configure" perl script by typing the following in the command prompt, where the prefix argument specifies where openSSL will be installed. In my case c:\openssl.
> perl Configure VC-WIN32 --prefix=c:\openssl
3. Add Assembly Functions
Add assembly functions (really don't know what it means at the moment) by typing the following from the command prompt.
> ms\do_masm
4. Make the following modifications to files
4-1. in crypto\cversion.c line 105
return "OPENSSLDIR: \"" OPENSSLDIR "\"";
↓
return "OPENSSLDIR: \" OPENSSLDIR \"";
4-2. in crypto\cryptlib.c line 84~86
#define X509_CERT_DIR OPENSSLDIR "/certs"
#define X509_CERT_FILE OPENSSLDIR "/cert.pem"
#define X509_PRIVATE_DIR OPENSSLDIR "/private"
#define X509_CERT_FILE OPENSSLDIR "/cert.pem"
#define X509_PRIVATE_DIR OPENSSLDIR "/private"
↓
#define X509_CERT_DIR OPENSSLDIR "\\certs"
#define X509_CERT_FILE OPENSSLDIR "\\cert.pem"
#define X509_PRIVATE_DIR OPENSSLDIR "\\private"
#define X509_CERT_FILE OPENSSLDIR "\\cert.pem"
#define X509_PRIVATE_DIR OPENSSLDIR "\\private"
4-3. in crypto\opensslconf.h line 107~108
(the dir path may differ depending on the argument used for prefix when configuring)
(the dir path may differ depending on the argument used for prefix when configuring)
#define ENGINESDIR "c:\openssl/lib/engines"
#define OPENSSLDIR "c:\openssl/ssl"
#define OPENSSLDIR "c:\openssl/ssl"
↓
#define ENGINESDIR "c:\\openssl\\lib\\engines"
#define OPENSSLDIR "c:\\openssl\\ssl"
#define OPENSSLDIR "c:\\openssl\\ssl"
'Information > Programming' 카테고리의 다른 글
Something worth knowing about HttpEndRequest (0) | 2009.09.09 |
---|---|
Using HttpSendRequestEx for large POST requests (3) | 2009.06.27 |
WinINet Error Message ERROR_INTERNET_SECURITY_CHANNEL_ERROR (2) | 2009.06.12 |
Basics of Compilers... (5) | 2009.02.12 |
Building curl 17.19.3 with OpenSSL and zlib on MSVC (2) | 2009.02.03 |
Working with WebCore in Webkit... (4) | 2009.01.13 |
Making your code more portable by avoiding inlining??? (6) | 2008.11.23 |
GNU Libtool 사용해서 shared object library 만들어보기 (5) | 2008.10.25 |
[S/E] Term confusion - Association and Object Association (4) | 2008.03.23 |
[VC++] Need a more accurate timer? (0) | 2008.03.18 |