mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
Merge pull request #5307 from kareem-wolfssl/miscfixes2
Fix a couple of STM32 bugs, and add some missing mutex frees.
This commit is contained in:
@@ -548,7 +548,7 @@ static int ServerMemRecv(info_t* info, char* buf, int sz)
|
|||||||
}
|
}
|
||||||
osSemaphoreAcquire(info->server.mutex, osWaitForever);
|
osSemaphoreAcquire(info->server.mutex, osWaitForever);
|
||||||
#else
|
#else
|
||||||
if (osSignalWait(1, RECV_WAIT_TIMEOUT) == osEventTimeout) {
|
if (osSignalWait(1, RECV_WAIT_TIMEOUT).status == osEventTimeout) {
|
||||||
printf("Server Recv: Timeout!\n");
|
printf("Server Recv: Timeout!\n");
|
||||||
return WOLFSSL_CBIO_ERR_TIMEOUT;
|
return WOLFSSL_CBIO_ERR_TIMEOUT;
|
||||||
}
|
}
|
||||||
@@ -644,7 +644,7 @@ static int ClientMemRecv(info_t* info, char* buf, int sz)
|
|||||||
}
|
}
|
||||||
osSemaphoreAcquire(info->client.mutex, osWaitForever);
|
osSemaphoreAcquire(info->client.mutex, osWaitForever);
|
||||||
#else
|
#else
|
||||||
if (osSignalWait(1, RECV_WAIT_TIMEOUT) == osEventTimeout) {
|
if (osSignalWait(1, RECV_WAIT_TIMEOUT).status == osEventTimeout) {
|
||||||
printf("Client Recv: Timeout!\n");
|
printf("Client Recv: Timeout!\n");
|
||||||
return WOLFSSL_CBIO_ERR_TIMEOUT;
|
return WOLFSSL_CBIO_ERR_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
8
src/pk.c
8
src/pk.c
@@ -6164,6 +6164,10 @@ void wolfSSL_DH_free(WOLFSSL_DH* dh)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SINGLE_THREADED
|
||||||
|
wc_FreeMutex(&dh->refMutex);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (dh->internal) {
|
if (dh->internal) {
|
||||||
wc_FreeDhKey((DhKey*)dh->internal);
|
wc_FreeDhKey((DhKey*)dh->internal);
|
||||||
XFREE(dh->internal, NULL, DYNAMIC_TYPE_DH);
|
XFREE(dh->internal, NULL, DYNAMIC_TYPE_DH);
|
||||||
@@ -8330,6 +8334,10 @@ void wolfSSL_EC_KEY_free(WOLFSSL_EC_KEY *key)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SINGLE_THREADED
|
||||||
|
wc_FreeMutex(&key->refMutex);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (key->internal != NULL) {
|
if (key->internal != NULL) {
|
||||||
wc_ecc_free((ecc_key*)key->internal);
|
wc_ecc_free((ecc_key*)key->internal);
|
||||||
XFREE(key->internal, heap, DYNAMIC_TYPE_ECC);
|
XFREE(key->internal, heap, DYNAMIC_TYPE_ECC);
|
||||||
|
@@ -2051,6 +2051,8 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HAL_RNG_DeInit(&hrng);
|
||||||
|
|
||||||
wolfSSL_CryptHwMutexUnLock();
|
wolfSSL_CryptHwMutexUnLock();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -823,13 +823,13 @@ typedef struct w64wrapper {
|
|||||||
#endif
|
#endif
|
||||||
#endif /* !NO_FILESYSTEM && !NO_STDIO_FILESYSTEM */
|
#endif /* !NO_FILESYSTEM && !NO_STDIO_FILESYSTEM */
|
||||||
|
|
||||||
#ifndef CTYPE_USER
|
#ifndef CTYPE_USER
|
||||||
#ifndef WOLFSSL_LINUXKM
|
#ifndef WOLFSSL_LINUXKM
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_ECC) || defined(HAVE_OCSP) || \
|
#if defined(HAVE_ECC) || defined(HAVE_OCSP) || \
|
||||||
defined(WOLFSSL_KEY_GEN) || !defined(NO_DSA) || \
|
defined(WOLFSSL_KEY_GEN) || !defined(NO_DSA) || \
|
||||||
defined(OPENSSL_EXTRA)
|
defined(OPENSSL_EXTRA)
|
||||||
#define XTOUPPER(c) toupper((c))
|
#define XTOUPPER(c) toupper((c))
|
||||||
#endif
|
#endif
|
||||||
#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
||||||
|
Reference in New Issue
Block a user