summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CryptoPP')
-rw-r--r--plugins/CryptoPP/cryptopp_10.vcxproj12
-rw-r--r--plugins/CryptoPP/cryptopp_12.vcxproj4
-rw-r--r--plugins/CryptoPP/cryptopp_14.vcxproj4
-rw-r--r--plugins/CryptoPP/src/GPGw/gpg_main.cpp10
-rw-r--r--plugins/CryptoPP/src/cpp_rsau.cpp6
-rw-r--r--plugins/CryptoPP/src/cpp_rsau.h6
-rw-r--r--plugins/CryptoPP/src/utf8.cpp4
7 files changed, 20 insertions, 26 deletions
diff --git a/plugins/CryptoPP/cryptopp_10.vcxproj b/plugins/CryptoPP/cryptopp_10.vcxproj
index ad3b93eaef..ad1afc0700 100644
--- a/plugins/CryptoPP/cryptopp_10.vcxproj
+++ b/plugins/CryptoPP/cryptopp_10.vcxproj
@@ -96,7 +96,8 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
+ <DelayLoadDLLs>
+ </DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -121,7 +122,8 @@
<AdditionalDependencies>ws2_32.lib;$(SolutionDir)$(Configuration)64\Obj\cryptlib\cryptlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
+ <DelayLoadDLLs>
+ </DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -150,7 +152,8 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
+ <DelayLoadDLLs>
+ </DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -179,7 +182,8 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
+ <DelayLoadDLLs>
+ </DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/plugins/CryptoPP/cryptopp_12.vcxproj b/plugins/CryptoPP/cryptopp_12.vcxproj
index 6852cb99c8..257c79c973 100644
--- a/plugins/CryptoPP/cryptopp_12.vcxproj
+++ b/plugins/CryptoPP/cryptopp_12.vcxproj
@@ -98,7 +98,6 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -123,7 +122,6 @@
<AdditionalDependencies>ws2_32.lib;$(SolutionDir)$(Configuration)64\Obj\cryptlib\cryptlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -152,7 +150,6 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -181,7 +178,6 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/plugins/CryptoPP/cryptopp_14.vcxproj b/plugins/CryptoPP/cryptopp_14.vcxproj
index d0da144bb1..20cf0206fa 100644
--- a/plugins/CryptoPP/cryptopp_14.vcxproj
+++ b/plugins/CryptoPP/cryptopp_14.vcxproj
@@ -98,7 +98,6 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -123,7 +122,6 @@
<AdditionalDependencies>ws2_32.lib;$(SolutionDir)$(Configuration)64\Obj\cryptlib\cryptlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -152,7 +150,6 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -181,7 +178,6 @@
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
- <DelayLoadDLLs>pgpsdk.dll;pgpsdknl.dll;pgpsdkui.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/plugins/CryptoPP/src/GPGw/gpg_main.cpp b/plugins/CryptoPP/src/GPGw/gpg_main.cpp
index fc544ffa52..5bbbc9f5e3 100644
--- a/plugins/CryptoPP/src/GPGw/gpg_main.cpp
+++ b/plugins/CryptoPP/src/GPGw/gpg_main.cpp
@@ -163,7 +163,6 @@ LPSTR __cdecl _gpg_encrypt(LPCSTR message, LPCSTR keyid)
{
char buffer[ciphertextsize];
char *encmessage = 0;
- int encmessagelen;
gpgResult gpgresult;
if(strlen(keyid))
@@ -174,7 +173,7 @@ LPSTR __cdecl _gpg_encrypt(LPCSTR message, LPCSTR keyid)
if(gpgresult!=gpgSuccess)
return 0;
- encmessagelen = strlen(buffer)+1;
+ size_t encmessagelen = strlen(buffer)+1;
encmessage = (char *) LocalAlloc(LPTR,encmessagelen);
memcpy(encmessage, buffer, encmessagelen);
}
@@ -192,7 +191,6 @@ LPSTR __cdecl _gpg_decrypt(LPCSTR message)
char *storedpassphrase;
char passphrase[passphrasesize];
char *decmessage = 0;
- int decmessagelen;
gpgResult gpgresult;
const char *begin = strstr(message, txtbeginpgpmessage);
@@ -254,7 +252,7 @@ LPSTR __cdecl _gpg_decrypt(LPCSTR message)
memset(passphrase, 0, sizeof(passphrase));
- decmessagelen = strlen(buffer)+1;
+ size_t decmessagelen = strlen(buffer)+1;
decmessage = (char *) LocalAlloc(LPTR,decmessagelen);
memcpy(decmessage, buffer, decmessagelen);
}
@@ -356,7 +354,6 @@ BOOL ShowSelectExecDlg(LPSTR path)
BOOL ShowSelectHomeDlg(LPSTR path)
{
- int i;
OPENFILENAME ofn;
ofn.lpstrFile = GetEnvValue("GNUPGHOME");
@@ -387,7 +384,8 @@ BOOL ShowSelectHomeDlg(LPSTR path)
ofn.lpstrTitle = "Open Public Keyring";
if (!GetOpenFileName(&ofn)) return FALSE;
- for(i=strlen(path);i && path[i]!='\\';i--);
+ int i;
+ for(i = (int)strlen(path);i && path[i]!='\\';i--);
path[i] = 0;
return TRUE;
diff --git a/plugins/CryptoPP/src/cpp_rsau.cpp b/plugins/CryptoPP/src/cpp_rsau.cpp
index b0913219fa..b2bc42d302 100644
--- a/plugins/CryptoPP/src/cpp_rsau.cpp
+++ b/plugins/CryptoPP/src/cpp_rsau.cpp
@@ -111,7 +111,7 @@ string hash(string& b)
return ::hash((PBYTE)b.data(), b.length());
}
-string hash(PBYTE b, int l)
+string hash(PBYTE b, size_t l)
{
BYTE h[RSA_KEYSIZE];
RSA_CalculateDigest(h, b, l);
@@ -129,7 +129,7 @@ string hash128(LPSTR b)
return hash128((PBYTE)b, strlen(b));
}
-string hash128(PBYTE b, int l)
+string hash128(PBYTE b, size_t l)
{
BYTE h[RIPEMD128::DIGESTSIZE];
RIPEMD128().CalculateDigest(h, b, l);
@@ -147,7 +147,7 @@ string hash256(LPSTR b)
return hash256((PBYTE)b, strlen(b));
}
-string hash256(PBYTE b, int l)
+string hash256(PBYTE b, size_t l)
{
BYTE h[RIPEMD256::DIGESTSIZE];
RIPEMD256().CalculateDigest(h, b, l);
diff --git a/plugins/CryptoPP/src/cpp_rsau.h b/plugins/CryptoPP/src/cpp_rsau.h
index bc45a248c5..38ba656f9d 100644
--- a/plugins/CryptoPP/src/cpp_rsau.h
+++ b/plugins/CryptoPP/src/cpp_rsau.h
@@ -77,15 +77,15 @@ string& un_tlv(string&,int&,int&);
int str2int(string&);
string hash(string&);
-string hash(PBYTE,int);
+string hash(PBYTE, size_t);
string hash128(string&);
string hash128(LPSTR);
-string hash128(PBYTE,int);
+string hash128(PBYTE, size_t);
string hash256(string&);
string hash256(LPSTR);
-string hash256(PBYTE,int);
+string hash256(PBYTE, size_t);
Integer BinaryToInteger(const string&);
string IntegerToBinary(const Integer&);
diff --git a/plugins/CryptoPP/src/utf8.cpp b/plugins/CryptoPP/src/utf8.cpp
index e6b9602161..77c13fa3bc 100644
--- a/plugins/CryptoPP/src/utf8.cpp
+++ b/plugins/CryptoPP/src/utf8.cpp
@@ -45,13 +45,13 @@ LPSTR __cdecl utf8encode(LPCWSTR str)
LPWSTR __cdecl utf8decode(LPCSTR str)
{
- int i, len;
+ int i;
LPSTR p;
// LPWSTR wszOut;
if (str == NULL) return NULL;
- len = strlen(str) + 1;
+ size_t len = strlen(str) + 1;
SAFE_FREE(wszOut);
if ((wszOut = (LPWSTR)malloc(len*sizeof(WCHAR))) == NULL)