r3385 - in trunk/libmikey: . include include/libmikey keyagreement mikey vs8_proj

erik at minisip.org erik at minisip.org
Wed Aug 22 15:38:21 CEST 2007


Author: erik
Date: 2007-08-22 15:38:21 +0200 (Wed, 22 Aug 2007)
New Revision: 3385

Added:
   trunk/libmikey/vs8_proj/
   trunk/libmikey/vs8_proj/libmikey.vcproj
Modified:
   trunk/libmikey/include/config.h
   trunk/libmikey/include/libmikey/KeyAgreement.h
   trunk/libmikey/include/libmikey/MikeyMessage.h
   trunk/libmikey/keyagreement/KeyAgreementDH.cxx
   trunk/libmikey/keyagreement/KeyAgreementPKE.cxx
   trunk/libmikey/mikey/MikeyPayloadT.cxx
Log:
libmikey:
 - compile fixes for MSVS
 - Added MSVS project file

Modified: trunk/libmikey/include/config.h
===================================================================
--- trunk/libmikey/include/config.h	2007-08-22 13:36:05 UTC (rev 3384)
+++ trunk/libmikey/include/config.h	2007-08-22 13:38:21 UTC (rev 3385)
@@ -26,10 +26,12 @@
 #define CONFIG_H
 
 /* Compilation time configuration */
-#ifndef _WIN32_WCE
+//#ifndef _WIN32_WCE
+#if defined(_MSC_VER) || defined(_WIN32_WCE)
+#	include"compilation_config_w32_wce.h"
+#	pragma warning (disable: 4290)
+#else
 #	include"compilation_config.h"
-#else
-#	include"compilation_config_w32_wce.h"
 #endif
 
 #ifndef LIBMIKEY_EXPORTS

Modified: trunk/libmikey/include/libmikey/KeyAgreement.h
===================================================================
--- trunk/libmikey/include/libmikey/KeyAgreement.h	2007-08-22 13:36:05 UTC (rev 3384)
+++ trunk/libmikey/include/libmikey/KeyAgreement.h	2007-08-22 13:38:21 UTC (rev 3385)
@@ -228,4 +228,10 @@
 		std::string peerUriValue;
 };
 
+//If we don't include MikeyMessage, then any user
+//of this header file will not compile without including
+//it.
+#include<libmikey/MikeyMessage.h>
+
+
 #endif

Modified: trunk/libmikey/include/libmikey/MikeyMessage.h
===================================================================
--- trunk/libmikey/include/libmikey/MikeyMessage.h	2007-08-22 13:36:05 UTC (rev 3384)
+++ trunk/libmikey/include/libmikey/MikeyMessage.h	2007-08-22 13:38:21 UTC (rev 3385)
@@ -69,6 +69,7 @@
 class SipSim;
 class Certificate;
 class CertificateSet;
+class KeyAgreementDH;
 class KeyAgreementDHHMAC;
 class KeyAgreementPKE;
 class KeyAgreementRSAR;

Modified: trunk/libmikey/keyagreement/KeyAgreementDH.cxx
===================================================================
--- trunk/libmikey/keyagreement/KeyAgreementDH.cxx	2007-08-22 13:36:05 UTC (rev 3384)
+++ trunk/libmikey/keyagreement/KeyAgreementDH.cxx	2007-08-22 13:38:21 UTC (rev 3385)
@@ -30,8 +30,8 @@
 #include<libmikey/MikeyMessage.h>
 #include<libmcrypto/OakleyDH.h>
 #include<libmcrypto/SipSim.h>
+#include<algorithm>
 
-
 #ifdef SCSIM_SUPPORT
 #include<libmcrypto/SipSimSmartCardGD.h>
 #endif

Modified: trunk/libmikey/keyagreement/KeyAgreementPKE.cxx
===================================================================
--- trunk/libmikey/keyagreement/KeyAgreementPKE.cxx	2007-08-22 13:36:05 UTC (rev 3384)
+++ trunk/libmikey/keyagreement/KeyAgreementPKE.cxx	2007-08-22 13:38:21 UTC (rev 3385)
@@ -15,9 +15,12 @@
 	int envKeyLength = 112;
 
 	//envelope key to encrypt KEMAC payload
-	byte_t envKey[ envKeyLength ];
+	//byte_t envKey[ envKeyLength ];
+	byte_t *envKey = new byte_t[ envKeyLength ];
 	Rand::randomize( envKey, envKeyLength );
 	setPSK( envKey, envKeyLength );
+	
+	delete []envKey;
 
 	//verification set
 	setV(1);
@@ -31,9 +34,12 @@
 	int envKeyLength = 112;
 
 	//envelope key to encrypt KEMAC payload
-	byte_t envKey[ envKeyLength ];
+	//byte_t envKey[ envKeyLength ];
+	byte_t *envKey = new byte_t[ envKeyLength ];
+
 	Rand::randomize( envKey, envKeyLength );
 	setPSK( envKey, envKeyLength );
+	delete []envKey;
 }
 
 KeyAgreementPKE::~KeyAgreementPKE(){

Modified: trunk/libmikey/mikey/MikeyPayloadT.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadT.cxx	2007-08-22 13:36:05 UTC (rev 3384)
+++ trunk/libmikey/mikey/MikeyPayloadT.cxx	2007-08-22 13:38:21 UTC (rev 3385)
@@ -32,7 +32,9 @@
 
 #include<assert.h>
 
-#ifndef _MSC_VER
+#ifdef _MSC_VER
+#	include<Winsock2.h>
+#else
 #	include<time.h>
 #	include<sys/time.h>
 #endif

Added: trunk/libmikey/vs8_proj/libmikey.vcproj
===================================================================
--- trunk/libmikey/vs8_proj/libmikey.vcproj	                        (rev 0)
+++ trunk/libmikey/vs8_proj/libmikey.vcproj	2007-08-22 13:38:21 UTC (rev 3385)
@@ -0,0 +1,473 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="libmikey"
+	ProjectGUID="{E5C381B8-4887-4B57-889E-C7061A0E2B2D}"
+	RootNamespace="libmikey"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\libmutil\include;..\..\libmcrypto\include"
+				PreprocessorDefinitions="LIBMIKEY_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="..\..\libmcrypto\vs8_proj\Debug\libmcrypto.lib ..\..\libmutil\vs8_proj\Debug\libmutil.lib"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\include;..\..\libmutil\include;..\..\libmcrypto\include"
+				PreprocessorDefinitions="LIBMIKEY_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="..\..\libmcrypto\vs8_proj\Debug\libmcrypto.lib ..\..\libmutil\vs8_proj\Debug\libmutil.lib"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\keyagreement\KeyAgreement.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\keyagreement\KeyAgreementDH.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\keyagreement\KeyAgreementDHHMAC.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\keyagreement\KeyAgreementPKE.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\keyagreement\KeyAgreementPSK.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\keyagreement\KeyAgreementRSAR.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\keyagreement\KeyValidity.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\Mikey.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyCsIdMap.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyException.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessage.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessageDH.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessageDHHMAC.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessagePKE.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessagePSK.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessageRSAR.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayload.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadCERT.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadCHASH.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadDH.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadERR.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadGeneralExtension.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadHDR.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadID.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadKEMAC.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadKeyData.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadPKE.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadRAND.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadSIGN.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadSP.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadT.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyPayloadV.cxx"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\include\compilation_config_w32_wce.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\exception.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\KeyAgreement.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\KeyAgreementDH.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\KeyAgreementDHHMAC.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\KeyAgreementPKE.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\KeyAgreementPSK.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\KeyAgreementRSAR.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\KeyValidity.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\libmikey_config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\Mikey.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyCsIdMap.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyDefs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyException.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyMessage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessageDH.h"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessageDHHMAC.h"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessagePKE.h"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessagePSK.h"
+				>
+			</File>
+			<File
+				RelativePath="..\mikey\MikeyMessageRSAR.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayload.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadCERT.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadCHASH.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadDH.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadERR.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadGeneralExtension.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadHDR.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadID.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadKEMAC.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadKeyData.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadPKE.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadRAND.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadSIGN.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadSP.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadT.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\libmikey\MikeyPayloadV.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>



More information about the Minisip-devel mailing list