mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Fix storage of SendBuffered's return code in wolfSSL_Connect. Store in ret initially, only store in ssl->error if there's an error. This matches the logic in wolfSSL_accept.
This commit is contained in:
@ -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