forked from wolfSSL/wolfssl
replace memset by XMEMSET
replaced memset with XMEMSET as requested by @dgarske INtime project files cleanup
This commit is contained in:
@ -27,7 +27,6 @@
|
||||
<ClCompile Include="..\..\wolfcrypt\src\arc4.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\asm.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\asn.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\async.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\blake2b.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\camellia.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\chacha.c" />
|
||||
@ -40,7 +39,6 @@
|
||||
<ClCompile Include="..\..\wolfcrypt\src\dh.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\dsa.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ecc.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ecc_fp.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ed25519.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\error.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\fe_low_mem.c" />
|
||||
@ -194,10 +192,6 @@
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<PreprocessorDefinitions>_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
|
||||
@ -213,10 +207,6 @@
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<PreprocessorDefinitions>_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
@ -68,10 +68,6 @@
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<PreprocessorDefinitions>WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
|
||||
@ -88,10 +84,7 @@
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<PreprocessorDefinitions>WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
@ -12671,7 +12671,7 @@ int openssl_pkey0_test(void)
|
||||
printf("error with encrypt init\n");
|
||||
return ERR_BASE_PKEY-17;
|
||||
}
|
||||
memset(out, 0, sizeof(out));
|
||||
XMEMSET(out, 0, sizeof(out));
|
||||
ret = EVP_PKEY_encrypt(enc, out, &outlen, in, sizeof(in));
|
||||
if (ret != 1) {
|
||||
printf("error encrypting msg\n");
|
||||
@ -12680,7 +12680,7 @@ int openssl_pkey0_test(void)
|
||||
|
||||
show("encrypted msg", out, outlen);
|
||||
|
||||
memset(plain, 0, sizeof(plain));
|
||||
XMEMSET(plain, 0, sizeof(plain));
|
||||
ret = EVP_PKEY_decrypt(dec, plain, &outlen, out, keySz);
|
||||
if (ret != 1) {
|
||||
printf("error decrypting msg\n");
|
||||
@ -12717,7 +12717,7 @@ int openssl_pkey0_test(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(out, 0, sizeof(out));
|
||||
XMEMSET(out, 0, sizeof(out));
|
||||
ret = EVP_PKEY_encrypt(enc, out, &outlen, in, sizeof(in));
|
||||
if (ret != 1) {
|
||||
printf("error encrypting msg\n");
|
||||
@ -12726,7 +12726,7 @@ int openssl_pkey0_test(void)
|
||||
|
||||
show("encrypted msg", out, outlen);
|
||||
|
||||
memset(plain, 0, sizeof(plain));
|
||||
XMEMSET(plain, 0, sizeof(plain));
|
||||
ret = EVP_PKEY_decrypt(dec, plain, &outlen, out, keySz);
|
||||
if (ret != 1) {
|
||||
printf("error decrypting msg\n");
|
||||
@ -13017,7 +13017,7 @@ int openssl_evpSig_test()
|
||||
show("message = ", (char *)msg, count);
|
||||
|
||||
/* sign */
|
||||
memset(sig, 0, sizeof(sig));
|
||||
XMEMSET(sig, 0, sizeof(sig));
|
||||
pt = (const void*)msg;
|
||||
ret1 = EVP_SignUpdate(sign, pt, count);
|
||||
ret2 = EVP_SignFinal(sign, sig, &sigSz, prvPkey);
|
||||
@ -15729,8 +15729,8 @@ int ecc_test_buffers(void) {
|
||||
int verify = 0;
|
||||
word32 x;
|
||||
|
||||
memset(&cliKey, 0, sizeof(ecc_key));
|
||||
memset(&servKey, 0, sizeof(ecc_key));
|
||||
XMEMSET(&cliKey, 0, sizeof(ecc_key));
|
||||
XMEMSET(&servKey, 0, sizeof(ecc_key));
|
||||
|
||||
bytes = (size_t)sizeof_ecc_clikey_der_256;
|
||||
/* place client key into ecc_key struct cliKey */
|
||||
@ -18486,7 +18486,7 @@ int blob_test(void)
|
||||
};
|
||||
|
||||
|
||||
memset(blob, 0, sizeof(blob));
|
||||
XMEMSET(blob, 0, sizeof(blob));
|
||||
outSz = sizeof(blob);
|
||||
ret = wc_caamCreateBlob((byte*)iv, sizeof(iv), blob, &outSz);
|
||||
if (ret != 0) {
|
||||
@ -18499,7 +18499,7 @@ int blob_test(void)
|
||||
ERROR_OUT(-8201, exit_blob);
|
||||
}
|
||||
|
||||
memset(blob, 0, sizeof(blob));
|
||||
XMEMSET(blob, 0, sizeof(blob));
|
||||
outSz = sizeof(blob);
|
||||
ret = wc_caamCreateBlob((byte*)iv, sizeof(iv), blob, &outSz);
|
||||
if (ret != 0) {
|
||||
@ -18515,7 +18515,7 @@ int blob_test(void)
|
||||
ERROR_OUT(-8204, exit_blob);
|
||||
}
|
||||
|
||||
memset(blob, 0, sizeof(blob));
|
||||
XMEMSET(blob, 0, sizeof(blob));
|
||||
outSz = sizeof(blob);
|
||||
ret = wc_caamCreateBlob((byte*)text, sizeof(text), blob, &outSz);
|
||||
if (ret != 0) {
|
||||
|
@ -639,7 +639,7 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
|
||||
if (addr == NULL)
|
||||
err_sys("invalid argument to build_addr, addr is NULL");
|
||||
|
||||
memset(addr, 0, sizeof(SOCKADDR_IN_T));
|
||||
XMEMSET(addr, 0, sizeof(SOCKADDR_IN_T));
|
||||
|
||||
#ifndef TEST_IPV6
|
||||
/* peer could be in human readable form */
|
||||
@ -692,7 +692,7 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
|
||||
int ret;
|
||||
char strPort[80];
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
XMEMSET(&hints, 0, sizeof(hints));
|
||||
|
||||
hints.ai_family = AF_INET_V;
|
||||
if (udp) {
|
||||
@ -1422,7 +1422,7 @@ static INLINE int myDateCb(int preverify, WOLFSSL_X509_STORE_CTX* store)
|
||||
|
||||
#ifdef HAVE_EXT_CACHE
|
||||
|
||||
static INLINE WOLFSSL_SESSION* mySessGetCb(WOLFSSL* ssl, unsigned char* id,
|
||||
static INLINE WOLFSSL_SESSION* mySessGetCb(WOLFSSL* ssl, unsigned char* id,
|
||||
int id_len, int* copy)
|
||||
{
|
||||
(void)ssl;
|
||||
@ -1852,14 +1852,14 @@ static INLINE void SetupAtomicUser(WOLFSSL_CTX* ctx, WOLFSSL* ssl)
|
||||
encCtx = (AtomicEncCtx*)malloc(sizeof(AtomicEncCtx));
|
||||
if (encCtx == NULL)
|
||||
err_sys("AtomicEncCtx malloc failed");
|
||||
memset(encCtx, 0, sizeof(AtomicEncCtx));
|
||||
XMEMSET(encCtx, 0, sizeof(AtomicEncCtx));
|
||||
|
||||
decCtx = (AtomicDecCtx*)malloc(sizeof(AtomicDecCtx));
|
||||
if (decCtx == NULL) {
|
||||
free(encCtx);
|
||||
err_sys("AtomicDecCtx malloc failed");
|
||||
}
|
||||
memset(decCtx, 0, sizeof(AtomicDecCtx));
|
||||
XMEMSET(decCtx, 0, sizeof(AtomicDecCtx));
|
||||
|
||||
wolfSSL_CTX_SetMacEncryptCb(ctx, myMacEncryptCb);
|
||||
wolfSSL_SetMacEncryptCtx(ssl, encCtx);
|
||||
|
Reference in New Issue
Block a user