Build OpenSSL with Visual Studio 2008
These days building OpenSSL with Visual Studio 2008 has become really easy. I don’t like to edit .cnf files so i decided to patch the code a little so that the default configuration file becomes openssl.config:
string basePath = @"C:\src\openssl-0.9.8g";
string originalConfigfile = "openssl.cnf";
string updatedConfigfile = "openssl.config";
foreach (string filename in Directory.GetFiles(basePath, "*.*", SearchOption.AllDirectories))
{
string contents = File.ReadAllText(filename);
if (contents.Contains(originalConfigfile))
{
Console.WriteLine(filename);
File.WriteAllText(filename, contents.Replace(originalConfigfile, updatedConfigfile));
}
}
File.WriteAllText(basePath + @"\apps\" + updatedConfigfile, File.ReadAllText(basePath + @"\apps\" + originalConfigfile));
Open a Visual Studio 2008 Command prompt and add references to the Microsoft SDK as following:
SET PATH=%PATH%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin SET LIB=%LIB%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib SET INCLUDE=%INCLUDE%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\IncludeNow we simply have to follow the tasks listed in INSTALL.W32:
perl Configure VC-WIN32 –prefix=c:/openssl ms\do_masm nmake -f ms\ntdll.mak nmake -f ms\ntdll.mak test nmake -f ms\ntdll.mak installHappy OpenSSL’ing!
Newbie in OpenSSL
Sorry for asking, could you tell me where to patch the code?
May 3rd, 2008 at 11:26
Thanks for the information! I’ve got struggled with this stuff yesterday now I think I can resolve this problem thanks to you.
January 13th, 2010 at 02:55
thanks for the information. now I think I can resolve the problem I faced yesterday.
January 13th, 2010 at 03:00