mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +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
|
&& ssl->error != WC_PENDING_E
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if ( (ssl->error = SendBuffered(ssl)) == 0) {
|
ret = SendBuffered(ssl);
|
||||||
|
if (ret == 0) {
|
||||||
if (ssl->fragOffset == 0 && !ssl->options.buildingMsg) {
|
if (ssl->fragOffset == 0 && !ssl->options.buildingMsg) {
|
||||||
if (advanceState) {
|
if (advanceState) {
|
||||||
ssl->options.connectState++;
|
ssl->options.connectState++;
|
||||||
@ -12501,7 +12502,8 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
|
|||||||
&& ssl->error != WC_PENDING_E
|
&& ssl->error != WC_PENDING_E
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if ( (ret = SendBuffered(ssl)) == 0) {
|
ret = SendBuffered(ssl);
|
||||||
|
if (ret == 0) {
|
||||||
/* fragOffset is non-zero when sending fragments. On the last
|
/* fragOffset is non-zero when sending fragments. On the last
|
||||||
* fragment, fragOffset is zero again, and the state can be
|
* fragment, fragOffset is zero again, and the state can be
|
||||||
* advanced. */
|
* advanced. */
|
||||||
|
Reference in New Issue
Block a user