mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-24 16:52:24 +00:00
Remove #ifdef COVERITY.
Turns out that the precautions against winelib builds failing, which I put in years ago because I was using winelib as a build setup for Coverity testing, are all obsolete. My Coverity build scripts runs fine now without any of them.
This commit is contained in:
parent
3fbfc6a4ec
commit
3481d16b0f
@ -25,7 +25,7 @@ enddelegate
|
|||||||
# Windows scanner for download).
|
# Windows scanner for download).
|
||||||
delegate covscan32wine
|
delegate covscan32wine
|
||||||
in putty do tar xzvf cov-int.tar.gz
|
in putty do tar xzvf cov-int.tar.gz
|
||||||
in putty/windows do cov-build --dir ../cov-int make -f Makefile.mgw CC=winegcc RC=wrc XFLAGS="-DCOVERITY -DNO_SECUREZEROMEMORY -D_FORCE_SOFTWARE_AES"
|
in putty/windows do cov-build --dir ../cov-int make -f Makefile.mgw CC=winegcc RC=wrc
|
||||||
in putty do tar czvf cov-int.tar.gz cov-int
|
in putty do tar czvf cov-int.tar.gz cov-int
|
||||||
return putty/cov-int.tar.gz
|
return putty/cov-int.tar.gz
|
||||||
enddelegate
|
enddelegate
|
||||||
|
@ -23,34 +23,11 @@ bool got_crypt(void)
|
|||||||
attempted = true;
|
attempted = true;
|
||||||
crypt = load_system32_dll("crypt32.dll");
|
crypt = load_system32_dll("crypt32.dll");
|
||||||
successful = crypt &&
|
successful = crypt &&
|
||||||
#ifdef COVERITY
|
GET_WINDOWS_FUNCTION(crypt, CryptProtectMemory);
|
||||||
/* The build toolchain I use with Coverity doesn't know
|
|
||||||
* about this function, so can't type-check it */
|
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(crypt, CryptProtectMemory)
|
|
||||||
#else
|
|
||||||
GET_WINDOWS_FUNCTION(crypt, CryptProtectMemory)
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
return successful;
|
return successful;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef COVERITY
|
|
||||||
/*
|
|
||||||
* The hack I use to build for Coverity scanning, using winegcc and
|
|
||||||
* Makefile.mgw, didn't provide some defines in wincrypt.h last time I
|
|
||||||
* looked. Therefore, define them myself here, but enclosed in #ifdef
|
|
||||||
* COVERITY to ensure I don't make up random nonsense values for any
|
|
||||||
* real build.
|
|
||||||
*/
|
|
||||||
#ifndef CRYPTPROTECTMEMORY_BLOCK_SIZE
|
|
||||||
#define CRYPTPROTECTMEMORY_BLOCK_SIZE 16
|
|
||||||
#endif
|
|
||||||
#ifndef CRYPTPROTECTMEMORY_CROSS_PROCESS
|
|
||||||
#define CRYPTPROTECTMEMORY_CROSS_PROCESS 1
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char *capi_obfuscate_string(const char *realname)
|
char *capi_obfuscate_string(const char *realname)
|
||||||
{
|
{
|
||||||
char *cryptdata;
|
char *cryptdata;
|
||||||
|
@ -272,7 +272,7 @@ static SocketPeerInfo *sk_handle_peer_info(Socket *s)
|
|||||||
|
|
||||||
if (!kernel32_module) {
|
if (!kernel32_module) {
|
||||||
kernel32_module = load_system32_dll("kernel32.dll");
|
kernel32_module = load_system32_dll("kernel32.dll");
|
||||||
#if (defined _MSC_VER && _MSC_VER < 1900) || defined __MINGW32__ || defined COVERITY
|
#if (defined _MSC_VER && _MSC_VER < 1900) || defined __MINGW32__
|
||||||
/* For older Visual Studio, and MinGW too (at least as of
|
/* For older Visual Studio, and MinGW too (at least as of
|
||||||
* Ubuntu 16.04), this function isn't available in the header
|
* Ubuntu 16.04), this function isn't available in the header
|
||||||
* files to type-check. Ditto the toolchain I use for
|
* files to type-check. Ditto the toolchain I use for
|
||||||
|
@ -157,11 +157,9 @@ void dll_hijacking_protection(void)
|
|||||||
|
|
||||||
if (!kernel32_module) {
|
if (!kernel32_module) {
|
||||||
kernel32_module = load_system32_dll("kernel32.dll");
|
kernel32_module = load_system32_dll("kernel32.dll");
|
||||||
#if (defined _MSC_VER && _MSC_VER < 1900) || defined COVERITY
|
#if (defined _MSC_VER && _MSC_VER < 1900)
|
||||||
/* For older Visual Studio, and also for the system I
|
/* For older Visual Studio, this function isn't available in
|
||||||
* currently use for Coveritying the Windows code, this
|
* the header files to type-check */
|
||||||
* function isn't available in the header files to
|
|
||||||
* type-check */
|
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(
|
GET_WINDOWS_FUNCTION_NO_TYPECHECK(
|
||||||
kernel32_module, SetDefaultDllDirectories);
|
kernel32_module, SetDefaultDllDirectories);
|
||||||
#else
|
#else
|
||||||
|
@ -279,21 +279,11 @@ void sk_init(void)
|
|||||||
GET_WINDOWS_FUNCTION(winsock_module, WSAStartup);
|
GET_WINDOWS_FUNCTION(winsock_module, WSAStartup);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, WSACleanup);
|
GET_WINDOWS_FUNCTION(winsock_module, WSACleanup);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, closesocket);
|
GET_WINDOWS_FUNCTION(winsock_module, closesocket);
|
||||||
#ifndef COVERITY
|
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, ntohl);
|
GET_WINDOWS_FUNCTION(winsock_module, ntohl);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, htonl);
|
GET_WINDOWS_FUNCTION(winsock_module, htonl);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, htons);
|
GET_WINDOWS_FUNCTION(winsock_module, htons);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, ntohs);
|
GET_WINDOWS_FUNCTION(winsock_module, ntohs);
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, gethostname);
|
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, gethostname);
|
||||||
#else
|
|
||||||
/* The toolchain I use for Windows Coverity builds doesn't know
|
|
||||||
* the type signatures of these */
|
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, ntohl);
|
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, htonl);
|
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, htons);
|
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, ntohs);
|
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, gethostname);
|
|
||||||
#endif
|
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, gethostbyname);
|
GET_WINDOWS_FUNCTION(winsock_module, gethostbyname);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, getservbyname);
|
GET_WINDOWS_FUNCTION(winsock_module, getservbyname);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, inet_addr);
|
GET_WINDOWS_FUNCTION(winsock_module, inet_addr);
|
||||||
|
Loading…
Reference in New Issue
Block a user