We finish the handshake when we move into the TLS_ST_OK state. At various
points we were also unnecessarily finishing it when we were reading/writing
the Finished message. It's much simpler just to do it in TLS_ST_OK, so
remove the other calls.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
#endif
if (statem_flush(s) != 1)
return WORK_MORE_B;
-
- if (s->hit && tls_finish_handshake(s, WORK_MORE_A) != 1)
- return WORK_ERROR;
break;
default:
return WORK_FINISHED_STOP;
#endif
- case TLS_ST_CR_FINISHED:
- if (!s->hit)
- return tls_finish_handshake(s, wst);
- else
- return WORK_FINISHED_STOP;
default:
break;
}
s->s3->previous_server_finished_len = i;
}
- return MSG_PROCESS_CONTINUE_PROCESSING;
+ return MSG_PROCESS_FINISHED_READING;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
ossl_statem_set_error(s);
#endif
return WORK_FINISHED_CONTINUE;
-
- case TLS_ST_SR_FINISHED:
- if (s->hit)
- return tls_finish_handshake(s, wst);
- else
- return WORK_FINISHED_STOP;
default:
break;
}