@@ -10592,7 +10592,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1059210592 if (ssl->options.sendVerify) {
1059310593 if ( (ssl->error = SendCertificate(ssl)) != 0) {
1059410594 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
10595- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
10595+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1059610596 #endif
1059710597 WOLFSSL_ERROR(ssl->error);
1059810598 return WOLFSSL_FATAL_ERROR;
@@ -10613,7 +10613,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1061310613 if (!ssl->options.resuming) {
1061410614 if ( (ssl->error = SendClientKeyExchange(ssl)) != 0) {
1061510615 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
10616- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
10616+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1061710617 #endif
1061810618#ifdef WOLFSSL_EXTRA_ALERTS
1061910619 if (ssl->error == WC_NO_ERR_TRACE(NO_PEER_KEY) ||
@@ -10644,7 +10644,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1064410644 if (ssl->options.sendVerify) {
1064510645 if ( (ssl->error = SendCertificateVerify(ssl)) != 0) {
1064610646 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
10647- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
10647+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1064810648 #endif
1064910649 WOLFSSL_ERROR(ssl->error);
1065010650 return WOLFSSL_FATAL_ERROR;
@@ -10659,7 +10659,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1065910659 case FIRST_REPLY_THIRD :
1066010660 if ( (ssl->error = SendChangeCipher(ssl)) != 0) {
1066110661 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
10662- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
10662+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1066310663 #endif
1066410664 WOLFSSL_ERROR(ssl->error);
1066510665 return WOLFSSL_FATAL_ERROR;
@@ -10672,7 +10672,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1067210672 case FIRST_REPLY_FOURTH :
1067310673 if ( (ssl->error = SendFinished(ssl)) != 0) {
1067410674 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
10675- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
10675+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1067610676 #endif
1067710677 WOLFSSL_ERROR(ssl->error);
1067810678 return WOLFSSL_FATAL_ERROR;
@@ -11052,7 +11052,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1105211052 }
1105311053 if ( (ssl->error = SendServerHello(ssl)) != 0) {
1105411054 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11055- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
11055+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1105611056 #endif
1105711057 WOLFSSL_ERROR(ssl->error);
1105811058 return WOLFSSL_FATAL_ERROR;
@@ -11071,7 +11071,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1107111071 if (!ssl->options.resuming)
1107211072 if ( (ssl->error = SendCertificate(ssl)) != 0) {
1107311073 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11074- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
11074+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1107511075 #endif
1107611076 WOLFSSL_ERROR(ssl->error);
1107711077 return WOLFSSL_FATAL_ERROR;
@@ -11086,7 +11086,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1108611086 if (!ssl->options.resuming)
1108711087 if ( (ssl->error = SendCertificateStatus(ssl)) != 0) {
1108811088 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11089- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
11089+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1109011090 #endif
1109111091 WOLFSSL_ERROR(ssl->error);
1109211092 return WOLFSSL_FATAL_ERROR;
@@ -11105,7 +11105,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1110511105 if (!ssl->options.resuming)
1110611106 if ( (ssl->error = SendServerKeyExchange(ssl)) != 0) {
1110711107 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11108- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
11108+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1110911109 #endif
1111011110 WOLFSSL_ERROR(ssl->error);
1111111111 return WOLFSSL_FATAL_ERROR;
@@ -11120,8 +11120,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1112011120 if (ssl->options.verifyPeer) {
1112111121 if ( (ssl->error = SendCertificateRequest(ssl)) != 0) {
1112211122 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11123- /* See if an alert was sent. */
11124- ProcessReplyEx(ssl, 1);
11123+ wolfSSL_maybeCheckAlertOnErr(ssl, ssl->error);
1112511124 #endif
1112611125 WOLFSSL_ERROR(ssl->error);
1112711126 return WOLFSSL_FATAL_ERROR;
@@ -11141,7 +11140,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1114111140 if (!ssl->options.resuming)
1114211141 if ( (ssl->error = SendServerHelloDone(ssl)) != 0) {
1114311142 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11144- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
11143+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1114511144 #endif
1114611145 WOLFSSL_ERROR(ssl->error);
1114711146 return WOLFSSL_FATAL_ERROR;
@@ -11182,7 +11181,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1118211181 if (ssl->options.createTicket && !ssl->options.noTicketTls12) {
1118311182 if ( (ssl->error = SendTicket(ssl)) != 0) {
1118411183 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11185- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
11184+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1118611185 #endif
1118711186 WOLFSSL_MSG("Thought we need ticket but failed");
1118811187 WOLFSSL_ERROR(ssl->error);
@@ -11203,7 +11202,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1120311202
1120411203 if ( (ssl->error = SendChangeCipher(ssl)) != 0) {
1120511204 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11206- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
11205+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1120711206 #endif
1120811207 WOLFSSL_ERROR(ssl->error);
1120911208 return WOLFSSL_FATAL_ERROR;
@@ -11215,7 +11214,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1121511214 case CHANGE_CIPHER_SENT :
1121611215 if ( (ssl->error = SendFinished(ssl)) != 0) {
1121711216 #ifdef WOLFSSL_CHECK_ALERT_ON_ERR
11218- ProcessReplyEx (ssl, 1); /* See if an alert was sent. */
11217+ wolfSSL_maybeCheckAlertOnErr (ssl, ssl->error);
1121911218 #endif
1122011219 WOLFSSL_ERROR(ssl->error);
1122111220 return WOLFSSL_FATAL_ERROR;
0 commit comments