mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
@ -826,11 +826,6 @@ WOLFSSL_XIL_MSG_NO_SLEEP
|
|||||||
WOLFSSL_XMSS_LARGE_SECRET_KEY
|
WOLFSSL_XMSS_LARGE_SECRET_KEY
|
||||||
WOLFSSL_ZEPHYR
|
WOLFSSL_ZEPHYR
|
||||||
WOLF_ALLOW_BUILTIN
|
WOLF_ALLOW_BUILTIN
|
||||||
WOLF_CONF_IO
|
|
||||||
WOLF_CONF_KYBER
|
|
||||||
WOLF_CONF_PK
|
|
||||||
WOLF_CONF_RESUMPTION
|
|
||||||
WOLF_CONF_TPM
|
|
||||||
WOLF_CRYPTO_CB_CMD
|
WOLF_CRYPTO_CB_CMD
|
||||||
WOLF_CRYPTO_CB_FIND
|
WOLF_CRYPTO_CB_FIND
|
||||||
WOLF_CRYPTO_CB_ONLY_ECC
|
WOLF_CRYPTO_CB_ONLY_ECC
|
||||||
|
@ -8379,7 +8379,7 @@ void FreeKeyExchange(WOLFSSL* ssl)
|
|||||||
/* Free up all memory used by Suites structure from WOLFSSL */
|
/* Free up all memory used by Suites structure from WOLFSSL */
|
||||||
void FreeSuites(WOLFSSL* ssl)
|
void FreeSuites(WOLFSSL* ssl)
|
||||||
{
|
{
|
||||||
#ifdef OPENSSL_ALL
|
#ifdef OPENSSL_EXTRA
|
||||||
if (ssl->suitesStack != NULL) {
|
if (ssl->suitesStack != NULL) {
|
||||||
/* Enough to free stack structure since WOLFSSL_CIPHER
|
/* Enough to free stack structure since WOLFSSL_CIPHER
|
||||||
* isn't allocated separately. */
|
* isn't allocated separately. */
|
||||||
@ -8392,8 +8392,6 @@ void FreeSuites(WOLFSSL* ssl)
|
|||||||
wolfSSL_sk_SSL_CIPHER_free(ssl->clSuitesStack);
|
wolfSSL_sk_SSL_CIPHER_free(ssl->clSuitesStack);
|
||||||
ssl->clSuitesStack = NULL;
|
ssl->clSuitesStack = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef OPENSSL_EXTRA
|
|
||||||
XFREE(ssl->clSuites, ssl->heap, DYNAMIC_TYPE_SUITES);
|
XFREE(ssl->clSuites, ssl->heap, DYNAMIC_TYPE_SUITES);
|
||||||
ssl->clSuites = NULL;
|
ssl->clSuites = NULL;
|
||||||
#endif
|
#endif
|
||||||
@ -25348,10 +25346,12 @@ int SendAsyncData(WOLFSSL* ssl)
|
|||||||
* 2 in SCR and we have plain data ready
|
* 2 in SCR and we have plain data ready
|
||||||
* Early data logic may bypass this logic in TLSv1.3 when appropriate.
|
* Early data logic may bypass this logic in TLSv1.3 when appropriate.
|
||||||
*/
|
*/
|
||||||
static int ssl_in_handshake(WOLFSSL *ssl, int send)
|
static int ssl_in_handshake(WOLFSSL *ssl, int sending_data)
|
||||||
{
|
{
|
||||||
|
int SendAsyncData = 1;
|
||||||
|
(void)SendAsyncData;
|
||||||
if (IsSCR(ssl)) {
|
if (IsSCR(ssl)) {
|
||||||
if (send) {
|
if (sending_data) {
|
||||||
/* allow sending data in SCR */
|
/* allow sending data in SCR */
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
12
src/ssl.c
12
src/ssl.c
@ -21264,10 +21264,7 @@ void wolfSSL_print_all_errors_fp(XFILE fp)
|
|||||||
|
|
||||||
/* Note: This is a huge section of API's - through
|
/* Note: This is a huge section of API's - through
|
||||||
* wolfSSL_X509_OBJECT_get0_X509_CRL */
|
* wolfSSL_X509_OBJECT_get0_X509_CRL */
|
||||||
#if defined(OPENSSL_ALL) || (defined(OPENSSL_EXTRA) && \
|
#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA)
|
||||||
(defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || \
|
|
||||||
defined(HAVE_LIGHTY) || defined(WOLFSSL_HAPROXY) || \
|
|
||||||
defined(WOLFSSL_OPENSSH) || defined(HAVE_SBLIM_SFCB)))
|
|
||||||
|
|
||||||
#if defined(USE_WOLFSSL_MEMORY) && !defined(WOLFSSL_DEBUG_MEMORY) && \
|
#if defined(USE_WOLFSSL_MEMORY) && !defined(WOLFSSL_DEBUG_MEMORY) && \
|
||||||
!defined(WOLFSSL_STATIC_MEMORY)
|
!defined(WOLFSSL_STATIC_MEMORY)
|
||||||
@ -21435,6 +21432,7 @@ int wolfSSL_set_tlsext_host_name(WOLFSSL* ssl, const char* host_name)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NO_WOLFSSL_SERVER
|
||||||
/* May be called by server to get the requested accepted name and by the client
|
/* May be called by server to get the requested accepted name and by the client
|
||||||
* to get the requested name. */
|
* to get the requested name. */
|
||||||
const char * wolfSSL_get_servername(WOLFSSL* ssl, byte type)
|
const char * wolfSSL_get_servername(WOLFSSL* ssl, byte type)
|
||||||
@ -21446,6 +21444,8 @@ const char * wolfSSL_get_servername(WOLFSSL* ssl, byte type)
|
|||||||
!wolfSSL_is_server(ssl));
|
!wolfSSL_is_server(ssl));
|
||||||
return (const char *)serverName;
|
return (const char *)serverName;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* HAVE_SNI */
|
#endif /* HAVE_SNI */
|
||||||
|
|
||||||
WOLFSSL_CTX* wolfSSL_set_SSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
|
WOLFSSL_CTX* wolfSSL_set_SSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
|
||||||
@ -21676,9 +21676,7 @@ void wolfSSL_THREADID_set_numeric(void* id, unsigned long val)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* OPENSSL_ALL || (OPENSSL_EXTRA && (HAVE_STUNNEL || WOLFSSL_NGINX ||
|
#endif /* OPENSSL_ALL || OPENSSL_EXTRA */
|
||||||
* HAVE_LIGHTY || WOLFSSL_HAPROXY || WOLFSSL_OPENSSH ||
|
|
||||||
* HAVE_SBLIM_SFCB)) */
|
|
||||||
|
|
||||||
#ifdef HAVE_SNI
|
#ifdef HAVE_SNI
|
||||||
|
|
||||||
|
@ -1093,36 +1093,36 @@ static int wolfssl_asn1_integer_require_len(WOLFSSL_ASN1_INTEGER* a, int len,
|
|||||||
*/
|
*/
|
||||||
WOLFSSL_ASN1_INTEGER* wolfSSL_ASN1_INTEGER_dup(const WOLFSSL_ASN1_INTEGER* src)
|
WOLFSSL_ASN1_INTEGER* wolfSSL_ASN1_INTEGER_dup(const WOLFSSL_ASN1_INTEGER* src)
|
||||||
{
|
{
|
||||||
WOLFSSL_ASN1_INTEGER* dup = NULL;
|
WOLFSSL_ASN1_INTEGER* dst = NULL;
|
||||||
|
|
||||||
WOLFSSL_ENTER("wolfSSL_ASN1_INTEGER_dup");
|
WOLFSSL_ENTER("wolfSSL_ASN1_INTEGER_dup");
|
||||||
|
|
||||||
/* Check for object to duplicate. */
|
/* Check for object to duplicate. */
|
||||||
if (src != NULL) {
|
if (src != NULL) {
|
||||||
/* Create a new ASN.1 INTEGER object to be copied into. */
|
/* Create a new ASN.1 INTEGER object to be copied into. */
|
||||||
dup = wolfSSL_ASN1_INTEGER_new();
|
dst = wolfSSL_ASN1_INTEGER_new();
|
||||||
}
|
}
|
||||||
/* Check for object to copy into. */
|
/* Check for object to copy into. */
|
||||||
if (dup != NULL) {
|
if (dst != NULL) {
|
||||||
/* Copy simple fields. */
|
/* Copy simple fields. */
|
||||||
dup->length = src->length;
|
dst->length = src->length;
|
||||||
dup->negative = src->negative;
|
dst->negative = src->negative;
|
||||||
dup->type = src->type;
|
dst->type = src->type;
|
||||||
|
|
||||||
if (!src->isDynamic) {
|
if (!src->isDynamic) {
|
||||||
/* Copy over data from/to fixed buffer. */
|
/* Copy over data from/to fixed buffer. */
|
||||||
XMEMCPY(dup->intData, src->intData, WOLFSSL_ASN1_INTEGER_MAX);
|
XMEMCPY(dst->intData, src->intData, WOLFSSL_ASN1_INTEGER_MAX);
|
||||||
}
|
}
|
||||||
else if (wolfssl_asn1_integer_require_len(dup, src->length, 0) == 0) {
|
else if (wolfssl_asn1_integer_require_len(dst, src->length, 0) == 0) {
|
||||||
wolfSSL_ASN1_INTEGER_free(dup);
|
wolfSSL_ASN1_INTEGER_free(dst);
|
||||||
dup = NULL;
|
dst = NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
XMEMCPY(dup->data, src->data, (size_t)src->length);
|
XMEMCPY(dst->data, src->data, (size_t)src->length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return dup;
|
return dst;
|
||||||
}
|
}
|
||||||
#endif /* OPENSSL_EXTRA || WOLFSSL_WPAS_SMALL */
|
#endif /* OPENSSL_EXTRA || WOLFSSL_WPAS_SMALL */
|
||||||
|
|
||||||
|
@ -4097,7 +4097,7 @@ void wolfSSL_FreeSession(WOLFSSL_CTX* ctx, WOLFSSL_SESSION* session)
|
|||||||
ForceZero(session->sessionID, ID_LEN);
|
ForceZero(session->sessionID, ID_LEN);
|
||||||
|
|
||||||
if (session->type == WOLFSSL_SESSION_TYPE_HEAP) {
|
if (session->type == WOLFSSL_SESSION_TYPE_HEAP) {
|
||||||
XFREE(session, session->heap, DYNAMIC_TYPE_SESSION);
|
XFREE(session, session->heap, DYNAMIC_TYPE_SESSION); /* // NOLINT(clang-analyzer-unix.Malloc) */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66551,7 +66551,8 @@ static int test_wolfSSL_OCSP_parse_url(void)
|
|||||||
|
|
||||||
#if defined(OPENSSL_ALL) && defined(HAVE_OCSP) && \
|
#if defined(OPENSSL_ALL) && defined(HAVE_OCSP) && \
|
||||||
defined(WOLFSSL_SIGNER_DER_CERT) && !defined(NO_FILESYSTEM) && \
|
defined(WOLFSSL_SIGNER_DER_CERT) && !defined(NO_FILESYSTEM) && \
|
||||||
!defined(NO_ASN_TIME)
|
!defined(NO_ASN_TIME) && \
|
||||||
|
!defined(WOLFSSL_SM2) && !defined(WOLFSSL_SM3)
|
||||||
static time_t test_wolfSSL_OCSP_REQ_CTX_time_cb(time_t* t)
|
static time_t test_wolfSSL_OCSP_REQ_CTX_time_cb(time_t* t)
|
||||||
{
|
{
|
||||||
if (t != NULL) {
|
if (t != NULL) {
|
||||||
@ -66566,7 +66567,8 @@ static int test_wolfSSL_OCSP_REQ_CTX(void)
|
|||||||
{
|
{
|
||||||
EXPECT_DECLS;
|
EXPECT_DECLS;
|
||||||
#if defined(OPENSSL_ALL) && defined(HAVE_OCSP) && \
|
#if defined(OPENSSL_ALL) && defined(HAVE_OCSP) && \
|
||||||
defined(WOLFSSL_SIGNER_DER_CERT) && !defined(NO_FILESYSTEM)
|
defined(WOLFSSL_SIGNER_DER_CERT) && !defined(NO_FILESYSTEM) && \
|
||||||
|
!defined(WOLFSSL_SM2) && !defined(WOLFSSL_SM3)
|
||||||
/* This buffer was taken from the ocsp-stapling.test test case 1. The ocsp
|
/* This buffer was taken from the ocsp-stapling.test test case 1. The ocsp
|
||||||
* response was captured in wireshark. It contains both the http and binary
|
* response was captured in wireshark. It contains both the http and binary
|
||||||
* parts. The time test_wolfSSL_OCSP_REQ_CTX_time_cb is set exactly so that
|
* parts. The time test_wolfSSL_OCSP_REQ_CTX_time_cb is set exactly so that
|
||||||
|
@ -8216,7 +8216,7 @@ int sp_addmod_ct(const sp_int* a, const sp_int* b, const sp_int* m, sp_int* r)
|
|||||||
* @return MP_OKAY on success.
|
* @return MP_OKAY on success.
|
||||||
*/
|
*/
|
||||||
static void _sp_submod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
|
static void _sp_submod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
|
||||||
unsigned int max, sp_int* r)
|
unsigned int max_size, sp_int* r)
|
||||||
{
|
{
|
||||||
#ifndef SQR_MUL_ASM
|
#ifndef SQR_MUL_ASM
|
||||||
sp_int_sword w;
|
sp_int_sword w;
|
||||||
@ -8237,7 +8237,7 @@ static void _sp_submod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
|
|||||||
l = 0;
|
l = 0;
|
||||||
h = 0;
|
h = 0;
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < max; i++) {
|
for (i = 0; i < max_size; i++) {
|
||||||
/* Values past 'used' are not initialized. */
|
/* Values past 'used' are not initialized. */
|
||||||
mask_a += (i == a->used);
|
mask_a += (i == a->used);
|
||||||
mask_b += (i == b->used);
|
mask_b += (i == b->used);
|
||||||
|
Reference in New Issue
Block a user