Merge branch 'master' of github.com:cyassl/cyassl

This commit is contained in:
John Safranek 2012-09-26 13:02:20 -07:00
commit f044fbc1fe
5 changed files with 19 additions and 16 deletions

View File

@ -777,8 +777,8 @@ void AES_256_Key_Expansion(const unsigned char* userkey,
unsigned char* key_schedule); unsigned char* key_schedule);
int AES_set_encrypt_key (const unsigned char *userKey, const int bits, static int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
Aes* aes) Aes* aes)
{ {
if (!userKey || !aes) if (!userKey || !aes)
return BAD_FUNC_ARG; return BAD_FUNC_ARG;
@ -799,8 +799,8 @@ int AES_set_encrypt_key (const unsigned char *userKey, const int bits,
} }
int AES_set_decrypt_key (const unsigned char* userKey, const int bits, static int AES_set_decrypt_key(const unsigned char* userKey, const int bits,
Aes* aes) Aes* aes)
{ {
int nr; int nr;
Aes temp_key; Aes temp_key;

View File

@ -60,7 +60,6 @@
AC_DEFUN([AX_HARDEN_LINKER_FLAGS], [ AC_DEFUN([AX_HARDEN_LINKER_FLAGS], [
AC_REQUIRE([AX_CHECK_LINK_FLAG]) AC_REQUIRE([AX_CHECK_LINK_FLAG])
AC_REQUIRE([AX_VCS_CHECKOUT]) AC_REQUIRE([AX_VCS_CHECKOUT])
AC_REQUIRE([AX_DEBUG])
AS_IF([test "$ac_cv_vcs_checkout" = yes], [ AS_IF([test "$ac_cv_vcs_checkout" = yes], [
AX_CHECK_LINK_FLAG([-Werror]) AX_CHECK_LINK_FLAG([-Werror])
@ -74,9 +73,7 @@
AC_LANG_PUSH([C]) AC_LANG_PUSH([C])
AS_IF([test "$ax_with_debug" = yes], [ AS_IF([test "$ax_with_debug" = yes], [
AX_APPEND_COMPILE_FLAGS([-O0])],[ AX_APPEND_COMPILE_FLAGS([-O0])],[])
AX_APPEND_COMPILE_FLAGS([-O2])
])
ac_cv_warnings_as_errors=no ac_cv_warnings_as_errors=no
AS_IF([test "$ac_cv_vcs_checkout" = yes], [ AS_IF([test "$ac_cv_vcs_checkout" = yes], [

View File

@ -42,7 +42,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../" AdditionalIncludeDirectories="../"
PreprocessorDefinitions="CYASSL_SNIFFER;SSL_SNIFFER_EXPORTS" PreprocessorDefinitions="OPENSSL_EXTRA;CYASSL_RIPEMD;CYASSL_SHA512;NO_PSK;CYASSL_SNIFFER;SSL_SNIFFER_EXPORTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
@ -118,7 +118,7 @@
Optimization="2" Optimization="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../" AdditionalIncludeDirectories="../"
PreprocessorDefinitions="CYASSL_SNIFFER;SSL_SNIFFER_EXPORTS" PreprocessorDefinitions="OPENSSL_EXTRA;CYASSL_RIPEMD;CYASSL_SHA512;NO_PSK;CYASSL_SNIFFER;SSL_SNIFFER_EXPORTS"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@ -79,14 +79,16 @@ static void sig_handler(const int sig)
#ifndef _WIN32 #ifndef _WIN32
ssl_FreeSniffer(); ssl_FreeSniffer();
#endif #endif
exit(EXIT_SUCCESS); if (sig)
exit(EXIT_SUCCESS);
} }
static void err_sys(const char* msg) static void err_sys(const char* msg)
{ {
fprintf(stderr, "%s\n", msg); fprintf(stderr, "%s\n", msg);
exit(EXIT_FAILURE); if (msg)
exit(EXIT_FAILURE);
} }
@ -149,7 +151,9 @@ int main(int argc, char** argv)
" installed correctly and you have sufficient permissions"); " installed correctly and you have sufficient permissions");
printf("Enter the interface number (1-%d): ", i); printf("Enter the interface number (1-%d): ", i);
scanf("%d", &inum); ret = scanf("%d", &inum);
if (ret != 1)
printf("scanf port failed\n");
if (inum < 1 || inum > i) if (inum < 1 || inum > i)
err_sys("Interface number out of range"); err_sys("Interface number out of range");
@ -196,7 +200,9 @@ int main(int argc, char** argv)
if (ret != 0) printf("pcap_activate failed %s\n", pcap_geterr(pcap)); if (ret != 0) printf("pcap_activate failed %s\n", pcap_geterr(pcap));
printf("Enter the port to scan: "); printf("Enter the port to scan: ");
scanf("%d", &port); ret = scanf("%d", &port);
if (ret != 1)
printf("scanf port failed\n");
SNPRINTF(filter, sizeof(filter), "tcp and port %d", port); SNPRINTF(filter, sizeof(filter), "tcp and port %d", port);

View File

@ -41,7 +41,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../../../WpdPack/Include;../../include" AdditionalIncludeDirectories="../../../WpdPack/Include;../.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
@ -117,7 +117,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../../../WpdPack/Include;../../include" AdditionalIncludeDirectories="../../../WpdPack/Include;../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"