mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Fix for async TLS v1.3 with multiple WC_PENDING_E
on client_hello and server_hello processing. Fix for not aligned NUMA.
This commit is contained in:
@@ -12020,8 +12020,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
args->dCertInit = 0;
|
args->dCertInit = 0;
|
||||||
/* once again */
|
/* once again */
|
||||||
ret = ProcessPeerCertParse(ssl, args, CERT_TYPE,
|
ret = ProcessPeerCertParse(ssl, args, CERT_TYPE,
|
||||||
!ssl->options.verifyNone ? VERIFY : NO_VERIFY,
|
!ssl->options.verifyNone ? VERIFY : NO_VERIFY,
|
||||||
&subjectHash, &alreadySigner);
|
&subjectHash, &alreadySigner);
|
||||||
} else
|
} else
|
||||||
ret = ASN_NO_SIGNER_E;
|
ret = ASN_NO_SIGNER_E;
|
||||||
}
|
}
|
||||||
@@ -12235,8 +12235,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
args->dCertInit = 0;
|
args->dCertInit = 0;
|
||||||
/* once again */
|
/* once again */
|
||||||
ret = ProcessPeerCertParse(ssl, args, CERT_TYPE,
|
ret = ProcessPeerCertParse(ssl, args, CERT_TYPE,
|
||||||
!ssl->options.verifyNone ? VERIFY : NO_VERIFY,
|
!ssl->options.verifyNone ? VERIFY : NO_VERIFY,
|
||||||
&subjectHash, &alreadySigner);
|
&subjectHash, &alreadySigner);
|
||||||
} else
|
} else
|
||||||
ret = ASN_NO_SIGNER_E;
|
ret = ASN_NO_SIGNER_E;
|
||||||
}
|
}
|
||||||
|
12
src/tls13.c
12
src/tls13.c
@@ -3276,8 +3276,13 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
|
ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
|
||||||
if (ret != WC_NOT_PENDING_E) {
|
if (ret != WC_NOT_PENDING_E) {
|
||||||
/* Check for error */
|
/* Check for error */
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
if (ret == WC_PENDING_E) {
|
||||||
|
/* Mark message as not received so it can process again */
|
||||||
|
ssl->msgsReceived.got_server_hello--;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
@@ -4533,8 +4538,9 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
|
ret = wolfSSL_AsyncPop(ssl, &ssl->options.asyncState);
|
||||||
if (ret != WC_NOT_PENDING_E) {
|
if (ret != WC_NOT_PENDING_E) {
|
||||||
/* Check for error */
|
/* Check for error */
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
return ret;
|
goto exit_dch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1783,6 +1783,10 @@ void* wc_CryptoCb_IntelQaRealloc(void *ptr, size_t size, void* heap, int type
|
|||||||
if (newIsNuma == 0 && ptrIsNuma == 0) {
|
if (newIsNuma == 0 && ptrIsNuma == 0) {
|
||||||
allocNew = 1;
|
allocNew = 1;
|
||||||
}
|
}
|
||||||
|
/* confirm input is aligned, otherwise allocate new */
|
||||||
|
else if (((size_t)ptr % WOLF_HEADER_ALIGN) != 0) {
|
||||||
|
allocNew = 1;
|
||||||
|
}
|
||||||
/* if matching NUMA type and size fits, use existing */
|
/* if matching NUMA type and size fits, use existing */
|
||||||
else if (newIsNuma == ptrIsNuma && header->size >= size) {
|
else if (newIsNuma == ptrIsNuma && header->size >= size) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user