mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Merge pull request #1579 from C-Treff/Tenasys_Review
time 64bit, test update
This commit is contained in:
@@ -27,7 +27,6 @@
|
|||||||
<ClCompile Include="..\..\wolfcrypt\src\arc4.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\arc4.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\asm.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\asm.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\asn.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\asn.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\async.c" />
|
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\blake2b.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\blake2b.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\camellia.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\camellia.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\chacha.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\chacha.c" />
|
||||||
@@ -40,7 +39,6 @@
|
|||||||
<ClCompile Include="..\..\wolfcrypt\src\dh.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\dh.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\dsa.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\dsa.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\ecc.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\ecc.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\ecc_fp.c" />
|
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\ed25519.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\ed25519.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\error.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\error.c" />
|
||||||
<ClCompile Include="..\..\wolfcrypt\src\fe_low_mem.c" />
|
<ClCompile Include="..\..\wolfcrypt\src\fe_low_mem.c" />
|
||||||
@@ -192,12 +190,8 @@
|
|||||||
</Link>
|
</Link>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<ExceptionHandling>Async</ExceptionHandling>
|
<ExceptionHandling>Async</ExceptionHandling>
|
||||||
<PreprocessorDefinitions>_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
|
||||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
|
||||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
|
||||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
|
||||||
@@ -211,12 +205,8 @@
|
|||||||
</Link>
|
</Link>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<ExceptionHandling>Async</ExceptionHandling>
|
<ExceptionHandling>Async</ExceptionHandling>
|
||||||
<PreprocessorDefinitions>_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
|
||||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
|
||||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
|
||||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@@ -68,10 +68,6 @@
|
|||||||
<ExceptionHandling>Async</ExceptionHandling>
|
<ExceptionHandling>Async</ExceptionHandling>
|
||||||
<PreprocessorDefinitions>WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
|
||||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
|
||||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
|
||||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
|
||||||
@@ -88,10 +84,7 @@
|
|||||||
<ExceptionHandling>Async</ExceptionHandling>
|
<ExceptionHandling>Async</ExceptionHandling>
|
||||||
<PreprocessorDefinitions>WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
|
||||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
|
||||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@@ -13178,7 +13178,7 @@ int openssl_pkey0_test(void)
|
|||||||
printf("error with encrypt init\n");
|
printf("error with encrypt init\n");
|
||||||
return ERR_BASE_PKEY-17;
|
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));
|
ret = EVP_PKEY_encrypt(enc, out, &outlen, in, sizeof(in));
|
||||||
if (ret != 1) {
|
if (ret != 1) {
|
||||||
printf("error encrypting msg\n");
|
printf("error encrypting msg\n");
|
||||||
@@ -13187,7 +13187,7 @@ int openssl_pkey0_test(void)
|
|||||||
|
|
||||||
show("encrypted msg", out, outlen);
|
show("encrypted msg", out, outlen);
|
||||||
|
|
||||||
memset(plain, 0, sizeof(plain));
|
XMEMSET(plain, 0, sizeof(plain));
|
||||||
ret = EVP_PKEY_decrypt(dec, plain, &outlen, out, keySz);
|
ret = EVP_PKEY_decrypt(dec, plain, &outlen, out, keySz);
|
||||||
if (ret != 1) {
|
if (ret != 1) {
|
||||||
printf("error decrypting msg\n");
|
printf("error decrypting msg\n");
|
||||||
@@ -13224,7 +13224,7 @@ int openssl_pkey0_test(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
memset(out, 0, sizeof(out));
|
XMEMSET(out, 0, sizeof(out));
|
||||||
ret = EVP_PKEY_encrypt(enc, out, &outlen, in, sizeof(in));
|
ret = EVP_PKEY_encrypt(enc, out, &outlen, in, sizeof(in));
|
||||||
if (ret != 1) {
|
if (ret != 1) {
|
||||||
printf("error encrypting msg\n");
|
printf("error encrypting msg\n");
|
||||||
@@ -13233,7 +13233,7 @@ int openssl_pkey0_test(void)
|
|||||||
|
|
||||||
show("encrypted msg", out, outlen);
|
show("encrypted msg", out, outlen);
|
||||||
|
|
||||||
memset(plain, 0, sizeof(plain));
|
XMEMSET(plain, 0, sizeof(plain));
|
||||||
ret = EVP_PKEY_decrypt(dec, plain, &outlen, out, keySz);
|
ret = EVP_PKEY_decrypt(dec, plain, &outlen, out, keySz);
|
||||||
if (ret != 1) {
|
if (ret != 1) {
|
||||||
printf("error decrypting msg\n");
|
printf("error decrypting msg\n");
|
||||||
@@ -13524,7 +13524,7 @@ int openssl_evpSig_test()
|
|||||||
show("message = ", (char *)msg, count);
|
show("message = ", (char *)msg, count);
|
||||||
|
|
||||||
/* sign */
|
/* sign */
|
||||||
memset(sig, 0, sizeof(sig));
|
XMEMSET(sig, 0, sizeof(sig));
|
||||||
pt = (const void*)msg;
|
pt = (const void*)msg;
|
||||||
ret1 = EVP_SignUpdate(sign, pt, count);
|
ret1 = EVP_SignUpdate(sign, pt, count);
|
||||||
ret2 = EVP_SignFinal(sign, sig, &sigSz, prvPkey);
|
ret2 = EVP_SignFinal(sign, sig, &sigSz, prvPkey);
|
||||||
@@ -16336,6 +16336,9 @@ int ecc_test_buffers(void) {
|
|||||||
int verify = 0;
|
int verify = 0;
|
||||||
word32 x;
|
word32 x;
|
||||||
|
|
||||||
|
XMEMSET(&cliKey, 0, sizeof(ecc_key));
|
||||||
|
XMEMSET(&servKey, 0, sizeof(ecc_key));
|
||||||
|
|
||||||
bytes = (size_t)sizeof_ecc_clikey_der_256;
|
bytes = (size_t)sizeof_ecc_clikey_der_256;
|
||||||
/* place client key into ecc_key struct cliKey */
|
/* place client key into ecc_key struct cliKey */
|
||||||
ret = wc_EccPrivateKeyDecode(ecc_clikey_der_256, &idx, &cliKey,
|
ret = wc_EccPrivateKeyDecode(ecc_clikey_der_256, &idx, &cliKey,
|
||||||
@@ -19166,7 +19169,7 @@ int blob_test(void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
memset(blob, 0, sizeof(blob));
|
XMEMSET(blob, 0, sizeof(blob));
|
||||||
outSz = sizeof(blob);
|
outSz = sizeof(blob);
|
||||||
ret = wc_caamCreateBlob((byte*)iv, sizeof(iv), blob, &outSz);
|
ret = wc_caamCreateBlob((byte*)iv, sizeof(iv), blob, &outSz);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@@ -19179,7 +19182,7 @@ int blob_test(void)
|
|||||||
ERROR_OUT(-10101, exit_blob);
|
ERROR_OUT(-10101, exit_blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(blob, 0, sizeof(blob));
|
XMEMSET(blob, 0, sizeof(blob));
|
||||||
outSz = sizeof(blob);
|
outSz = sizeof(blob);
|
||||||
ret = wc_caamCreateBlob((byte*)iv, sizeof(iv), blob, &outSz);
|
ret = wc_caamCreateBlob((byte*)iv, sizeof(iv), blob, &outSz);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@@ -19195,7 +19198,7 @@ int blob_test(void)
|
|||||||
ERROR_OUT(-10104, exit_blob);
|
ERROR_OUT(-10104, exit_blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(blob, 0, sizeof(blob));
|
XMEMSET(blob, 0, sizeof(blob));
|
||||||
outSz = sizeof(blob);
|
outSz = sizeof(blob);
|
||||||
ret = wc_caamCreateBlob((byte*)text, sizeof(text), blob, &outSz);
|
ret = wc_caamCreateBlob((byte*)text, sizeof(text), blob, &outSz);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@@ -647,7 +647,7 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
|
|||||||
if (addr == NULL)
|
if (addr == NULL)
|
||||||
err_sys("invalid argument to build_addr, addr is 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
|
#ifndef TEST_IPV6
|
||||||
/* peer could be in human readable form */
|
/* peer could be in human readable form */
|
||||||
@@ -700,7 +700,7 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
|
|||||||
int ret;
|
int ret;
|
||||||
char strPort[80];
|
char strPort[80];
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
XMEMSET(&hints, 0, sizeof(hints));
|
||||||
|
|
||||||
hints.ai_family = AF_INET_V;
|
hints.ai_family = AF_INET_V;
|
||||||
if (udp) {
|
if (udp) {
|
||||||
@@ -1430,7 +1430,7 @@ static INLINE int myDateCb(int preverify, WOLFSSL_X509_STORE_CTX* store)
|
|||||||
|
|
||||||
#ifdef HAVE_EXT_CACHE
|
#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)
|
int id_len, int* copy)
|
||||||
{
|
{
|
||||||
(void)ssl;
|
(void)ssl;
|
||||||
@@ -1860,14 +1860,14 @@ static INLINE void SetupAtomicUser(WOLFSSL_CTX* ctx, WOLFSSL* ssl)
|
|||||||
encCtx = (AtomicEncCtx*)malloc(sizeof(AtomicEncCtx));
|
encCtx = (AtomicEncCtx*)malloc(sizeof(AtomicEncCtx));
|
||||||
if (encCtx == NULL)
|
if (encCtx == NULL)
|
||||||
err_sys("AtomicEncCtx malloc failed");
|
err_sys("AtomicEncCtx malloc failed");
|
||||||
memset(encCtx, 0, sizeof(AtomicEncCtx));
|
XMEMSET(encCtx, 0, sizeof(AtomicEncCtx));
|
||||||
|
|
||||||
decCtx = (AtomicDecCtx*)malloc(sizeof(AtomicDecCtx));
|
decCtx = (AtomicDecCtx*)malloc(sizeof(AtomicDecCtx));
|
||||||
if (decCtx == NULL) {
|
if (decCtx == NULL) {
|
||||||
free(encCtx);
|
free(encCtx);
|
||||||
err_sys("AtomicDecCtx malloc failed");
|
err_sys("AtomicDecCtx malloc failed");
|
||||||
}
|
}
|
||||||
memset(decCtx, 0, sizeof(AtomicDecCtx));
|
XMEMSET(decCtx, 0, sizeof(AtomicDecCtx));
|
||||||
|
|
||||||
wolfSSL_CTX_SetMacEncryptCb(ctx, myMacEncryptCb);
|
wolfSSL_CTX_SetMacEncryptCb(ctx, myMacEncryptCb);
|
||||||
wolfSSL_SetMacEncryptCtx(ssl, encCtx);
|
wolfSSL_SetMacEncryptCtx(ssl, encCtx);
|
||||||
|
Reference in New Issue
Block a user