configuring "internal" instead of "openssl" in windows XP

Jouni Malinen j at w1.fi
Thu Nov 22 21:18:57 EST 2007


On Fri, Oct 05, 2007 at 06:55:34PM +0530, Mahendra Prajapat wrote:

> Regarding wpa supplicant on windows XP ,I want to configure "CONFIG_TLS =
> internal". 
> >From where i can do this?
> I m using visual studio 2005 and want to build wpa supplicant  using
> internal TLS instead of Openssl.
> Also please tell what other files are needed to be included in "visual
> studio project solution" to build wpa supplicant with "experimental TLSv1
> client implementation" .

This requires changing src/utils/build_config.h to define following
macros:

#define CONFIG_TLS_INTERNAL
#define CONFIG_TLS_INTERNAL_CLIENT
#define CONFIG_INTERNAL_LIBTOMMATH
#define INTERNAL_AES
#define INTERNAL_SHA1
#define INTERNAL_SHA256
#define INTERNAL_MD5
#define INTERNAL_MD4
#define INTERNAL_DES
#define CONFIG_INTERNAL_X509
#define CONFIG_CRYPTO_INTERNAL

I added this into the 0.6.x branch as an optional block that can be
added by defining USE_INTERNAL_CRYPTO in the VS2005 project file.

In addition, tls_openssl.c and crypto_openssl.c needs to be replaced
with _internal.c versions and following files need to be added to the
project:

..\..\..\src\crypto\aes.c
..\..\..\src\crypto\des.c
..\..\..\src\tls\asn1.c
..\..\..\src\tls\bignum.c
..\..\..\src\tls\rsa.c
..\..\..\src\tls\tlsv1_client.c
..\..\..\src\tls\tlsv1_client_read.c
..\..\..\src\tls\tlsv1_client_write.c
..\..\..\src\tls\tlsv1_common.c
..\..\..\src\tls\tlsv1_cred.c
..\..\..\src\tls\tlsv1_record.c
..\..\..\src\tls\x509v3.c


The attached patch shows the changes to wpa_supplicant project. This is
against the current 0.6.x development tree in git.

-- 
Jouni Malinen                                            PGP id EFC895FA
-------------- next part --------------
diff --git a/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj b/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
index e885a37..4208b14 100755
--- a/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
+++ b/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
@@ -41,7 +41,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="..\..;..\..\..\src;..\..\..\src\utils;..\..\..\src\common;..\..\..\src\crypto;..\..\..\src\rsn_supp;C:\dev\WpdPack\include;C:\dev\openssl\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS;USE_INTERNAL_CRYPTO"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -120,7 +120,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="..\..;..\..\..\src;..\..\..\src\utils;..\..\..\src\common;..\..\..\src\crypto;..\..\..\src\rsn_supp;C:\dev\WpdPack\include;C:\dev\openssl\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CONFIG_WIN32_DEFAULTS;USE_INTERNAL_CRYPTO"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
@@ -183,14 +183,26 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
+				RelativePath="..\..\..\src\crypto\aes.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\src\crypto\aes_wrap.c"
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\src\tls\asn1.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\src\utils\base64.c"
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\src\tls\bignum.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\src\utils\common.c"
 				>
 			</File>
@@ -203,7 +215,7 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\..\src\crypto\crypto_openssl.c"
+				RelativePath="..\..\..\src\crypto\crypto_internal.c"
 				>
 			</File>
 			<File
@@ -215,6 +227,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\src\crypto\des.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\src\drivers\driver_ndis.c"
 				>
 			</File>
@@ -343,11 +359,39 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\src\tls\rsa.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\src\crypto\sha1.c"
 				>
 			</File>
 			<File
-				RelativePath="..\..\..\src\crypto\tls_openssl.c"
+				RelativePath="..\..\..\src\crypto\tls_internal.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\tls\tlsv1_client.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\tls\tlsv1_client_read.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\tls\tlsv1_client_write.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\tls\tlsv1_common.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\tls\tlsv1_cred.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\src\tls\tlsv1_record.c"
 				>
 			</File>
 			<File
@@ -374,6 +418,10 @@
 				RelativePath="..\..\wpa_supplicant.c"
 				>
 			</File>
+			<File
+				RelativePath="..\..\..\src\tls\x509v3.c"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Header Files"


More information about the HostAP mailing list