mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
Merge pull request #5327 from kareem-wolfssl/connectRetFix
Fix storage of SendBuffered's return code in wolfSSL_Connect.
This commit is contained in:
@ -1969,7 +1969,7 @@ int Dtls13SetRecordNumberKeys(WOLFSSL* ssl, enum encrypt_side side)
|
||||
{
|
||||
RecordNumberCiphers* enc = NULL;
|
||||
RecordNumberCiphers* dec = NULL;
|
||||
byte *encKey, *decKey;
|
||||
byte *encKey = NULL, *decKey = NULL;
|
||||
int ret;
|
||||
|
||||
if (ssl == NULL) {
|
||||
|
@ -11983,7 +11983,8 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
|
||||
&& ssl->error != WC_PENDING_E
|
||||
#endif
|
||||
) {
|
||||
if ( (ssl->error = SendBuffered(ssl)) == 0) {
|
||||
ret = SendBuffered(ssl);
|
||||
if (ret == 0) {
|
||||
if (ssl->fragOffset == 0 && !ssl->options.buildingMsg) {
|
||||
if (advanceState) {
|
||||
ssl->options.connectState++;
|
||||
@ -12501,7 +12502,8 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
|
||||
&& ssl->error != WC_PENDING_E
|
||||
#endif
|
||||
) {
|
||||
if ( (ret = SendBuffered(ssl)) == 0) {
|
||||
ret = SendBuffered(ssl);
|
||||
if (ret == 0) {
|
||||
/* fragOffset is non-zero when sending fragments. On the last
|
||||
* fragment, fragOffset is zero again, and the state can be
|
||||
* advanced. */
|
||||
|
Reference in New Issue
Block a user