SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE);
/* Put us into the "init" state so that we don't get our state cleared */
- statem_set_in_init(s, 1);
+ ossl_statem_set_in_init(s, 1);
if(BIO_dgram_get_peer(rbio, client) <= 0) {
SSLerr(SSL_F_DTLS1_LISTEN, ERR_R_INTERNAL_ERROR);
*/
if ((SSL_in_init(s) && !s->in_handshake) ||
(BIO_dgram_is_sctp(SSL_get_wbio(s)) &&
- statem_in_sctp_read_sock(s)))
+ ossl_statem_in_sctp_read_sock(s)))
#else
if (SSL_in_init(s) && !s->in_handshake)
#endif
}
IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, TLS_method,
- statem_accept,
- statem_connect, tls1_get_method, TLSv1_2_enc_data)
+ ossl_statem_accept,
+ ossl_statem_connect, tls1_get_method, TLSv1_2_enc_data)
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_method,
- statem_accept,
- statem_connect, tls1_get_method, TLSv1_2_enc_data)
+ ossl_statem_accept,
+ ossl_statem_connect, tls1_get_method, TLSv1_2_enc_data)
IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_method,
- statem_accept,
- statem_connect, tls1_get_method, TLSv1_1_enc_data)
+ ossl_statem_accept,
+ ossl_statem_connect, tls1_get_method, TLSv1_1_enc_data)
IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_method,
- statem_accept,
- statem_connect, tls1_get_method, TLSv1_enc_data)
+ ossl_statem_accept,
+ ossl_statem_connect, tls1_get_method, TLSv1_enc_data)
#ifndef OPENSSL_NO_SSL3_METHOD
-IMPLEMENT_ssl3_meth_func(SSLv3_method,
- statem_accept, statem_connect, tls1_get_method)
+IMPLEMENT_ssl3_meth_func(SSLv3_method, ossl_statem_accept, ossl_statem_connect,
+ tls1_get_method)
#endif
}
IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, TLS_server_method,
- statem_accept,
+ ossl_statem_accept,
ssl_undefined_function,
tls1_get_server_method, TLSv1_2_enc_data)
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_server_method,
- statem_accept,
+ ossl_statem_accept,
ssl_undefined_function,
tls1_get_server_method, TLSv1_2_enc_data)
IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_server_method,
- statem_accept,
+ ossl_statem_accept,
ssl_undefined_function,
tls1_get_server_method, TLSv1_1_enc_data)
IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_server_method,
- statem_accept,
+ ossl_statem_accept,
ssl_undefined_function,
tls1_get_server_method, TLSv1_enc_data)
#ifndef OPENSSL_NO_SSL3_METHOD
IMPLEMENT_ssl3_meth_func(SSLv3_server_method,
- statem_accept,
+ ossl_statem_accept,
ssl_undefined_function, tls1_get_server_method)
#endif
IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, TLS_client_method,
ssl_undefined_function,
- statem_connect,
+ ossl_statem_connect,
tls1_get_client_method, TLSv1_2_enc_data)
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_client_method,
ssl_undefined_function,
- statem_connect,
+ ossl_statem_connect,
tls1_get_client_method, TLSv1_2_enc_data)
IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_client_method,
ssl_undefined_function,
- statem_connect,
+ ossl_statem_connect,
tls1_get_client_method, TLSv1_1_enc_data)
IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_client_method,
ssl_undefined_function,
- statem_connect, tls1_get_client_method, TLSv1_enc_data)
+ ossl_statem_connect,
+ tls1_get_client_method, TLSv1_enc_data)
#ifndef OPENSSL_NO_SSL3_METHOD
IMPLEMENT_ssl3_meth_func(SSLv3_client_method,
ssl_undefined_function,
- statem_connect, tls1_get_client_method)
+ ossl_statem_connect, tls1_get_client_method)
#endif
IMPLEMENT_dtls1_meth_func(DTLS1_VERSION,
DTLSv1_method,
- statem_accept,
- statem_connect, dtls1_get_method, DTLSv1_enc_data)
+ ossl_statem_accept,
+ ossl_statem_connect,
+ dtls1_get_method, DTLSv1_enc_data)
IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION,
DTLSv1_2_method,
- statem_accept,
- statem_connect, dtls1_get_method, DTLSv1_2_enc_data)
+ ossl_statem_accept,
+ ossl_statem_connect,
+ dtls1_get_method, DTLSv1_2_enc_data)
IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION,
DTLS_method,
- statem_accept,
- statem_connect, dtls1_get_method, DTLSv1_2_enc_data)
+ ossl_statem_accept,
+ ossl_statem_connect,
+ dtls1_get_method, DTLSv1_2_enc_data)
/*
IMPLEMENT_dtls1_meth_func(DTLS1_VERSION,
DTLSv1_server_method,
- statem_accept,
+ ossl_statem_accept,
ssl_undefined_function,
dtls1_get_server_method, DTLSv1_enc_data)
IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION,
DTLSv1_2_server_method,
- statem_accept,
+ ossl_statem_accept,
ssl_undefined_function,
dtls1_get_server_method, DTLSv1_2_enc_data)
IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION,
DTLS_server_method,
- statem_accept,
+ ossl_statem_accept,
ssl_undefined_function,
dtls1_get_server_method, DTLSv1_2_enc_data)
IMPLEMENT_dtls1_meth_func(DTLS1_VERSION,
DTLSv1_client_method,
ssl_undefined_function,
- statem_connect,
+ ossl_statem_connect,
dtls1_get_client_method, DTLSv1_enc_data)
IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION,
DTLSv1_2_client_method,
ssl_undefined_function,
- statem_connect,
+ ossl_statem_connect,
dtls1_get_client_method, DTLSv1_2_enc_data)
IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION,
DTLS_client_method,
ssl_undefined_function,
- statem_connect,
+ ossl_statem_connect,
dtls1_get_client_method, DTLSv1_2_enc_data)
*/
if ((!s->in_handshake && SSL_in_init(s)) ||
(BIO_dgram_is_sctp(SSL_get_rbio(s))
- && statem_in_sctp_read_sock(s)
+ && ossl_statem_in_sctp_read_sock(s)
&& s->s3->in_read_app_data != 2))
#else
if (!s->in_handshake && SSL_in_init(s))
*/
if (BIO_dgram_is_sctp(SSL_get_rbio(s)) &&
SSL3_RECORD_get_type(rr) == SSL3_RT_APPLICATION_DATA &&
- statem_in_sctp_read_sock(s)) {
+ ossl_statem_in_sctp_read_sock(s)) {
s->rwstate = SSL_READING;
BIO_clear_retry_flags(SSL_get_rbio(s));
BIO_set_retry_read(SSL_get_rbio(s));
if (SSL_is_init_finished(s) &&
!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)) {
- statem_set_in_init(s, 1);
+ ossl_statem_set_in_init(s, 1);
s->renegotiate = 1;
s->new_session = 1;
}
*/
if (s->s3->in_read_app_data &&
(s->s3->total_renegotiations != 0) &&
- statem_app_data_allowed(s)) {
+ ossl_statem_app_data_allowed(s)) {
s->s3->in_read_app_data = 2;
return (-1);
} else {
if ((s->rlayer.handshake_fragment_len >= 4) && !s->in_handshake) {
if (SSL_is_init_finished(s) &&
!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)) {
- statem_set_in_init(s, 1);
+ ossl_statem_set_in_init(s, 1);
s->renegotiate = 1;
s->new_session = 1;
}
* application data at this point (session renegotiation not yet
* started), we will indulge it.
*/
- if (statem_app_data_allowed(s)) {
+ if (ossl_statem_app_data_allowed(s)) {
s->s3->in_read_app_data = 2;
return (-1);
} else {
* message, we need to set the state machine into the renegotiate
* state.
*/
- statem_set_renegotiate(s);
+ ossl_statem_set_renegotiate(s);
s->s3->renegotiate = 0;
s->s3->num_renegotiations++;
s->s3->total_renegotiations++;
return 0;
}
- statem_clear(s);
+ ossl_statem_clear(s);
s->version = s->method->version;
s->client_version = s->version;
{
s->server = 1;
s->shutdown = 0;
- statem_clear(s);
+ ossl_statem_clear(s);
s->handshake_func = s->method->ssl_accept;
clear_ciphers(s);
}
{
s->server = 0;
s->shutdown = 0;
- statem_clear(s);
+ ossl_statem_clear(s);
s->handshake_func = s->method->ssl_connect;
clear_ciphers(s);
}
{
const char *str;
- if (statem_in_error(s)) {
+ if (ossl_statem_in_error(s)) {
return "error";
}
{
const char *str;
- if (statem_in_error(s)) {
+ if (ossl_statem_in_error(s)) {
return "SSLERR";
}
/*
* Clear the state machine state and reset back to MSG_FLOW_UNINITED
*/
-void statem_clear(SSL *s)
+void ossl_statem_clear(SSL *s)
{
s->statem.state = MSG_FLOW_UNINITED;
s->statem.hand_state = TLS_ST_BEFORE;
/*
* Set the state machine up ready for a renegotiation handshake
*/
-void statem_set_renegotiate(SSL *s)
+void ossl_statem_set_renegotiate(SSL *s)
{
s->statem.state = MSG_FLOW_RENEGOTIATE;
s->statem.in_init = 1;
* Put the state machine into an error state. This is a permanent error for
* the current connection.
*/
-void statem_set_error(SSL *s)
+void ossl_statem_set_error(SSL *s)
{
s->statem.state = MSG_FLOW_ERROR;
}
* 1: Yes
* 0: No
*/
-int statem_in_error(const SSL *s)
+int ossl_statem_in_error(const SSL *s)
{
if (s->statem.state == MSG_FLOW_ERROR)
return 1;
return 0;
}
-void statem_set_in_init(SSL *s, int init)
+void ossl_statem_set_in_init(SSL *s, int init)
{
s->statem.in_init = init;
}
-int statem_connect(SSL *s) {
+int ossl_statem_connect(SSL *s) {
return state_machine(s, 0);
}
-int statem_accept(SSL *s)
+int ossl_statem_accept(SSL *s)
{
return state_machine(s, 1);
}
SSLerr(SSL_F_STATE_MACHINE,
SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_HANDSHAKE_FAILURE);
- statem_set_error(s);
+ ossl_statem_set_error(s);
goto end;
} else {
/*
}
} else {
/* Error */
- statem_set_error(s);
+ ossl_statem_set_error(s);
goto end;
}
}
/* Shouldn't happen */
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
SSLerr(SSL_F_READ_STATE_MACHINE, ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return SUB_STATE_ERROR;
}
}
* 1: Yes (application data allowed)
* 0: No (application data not allowed)
*/
-int statem_app_data_allowed(SSL *s)
+int ossl_statem_app_data_allowed(SSL *s)
{
STATEM *st = &s->statem;
/*
* Set flag used by SCTP to determine whether we are in the read sock state
*/
-void statem_set_sctp_read_sock(SSL *s, int read_sock)
+void ossl_statem_set_sctp_read_sock(SSL *s, int read_sock)
{
s->statem.in_sctp_read_sock = read_sock;
}
* *
*****************************************************************************/
-__owur int statem_accept(SSL *s);
-__owur int statem_connect(SSL *s);
-void statem_clear(SSL *s);
-void statem_set_renegotiate(SSL *s);
-void statem_set_error(SSL *s);
-int statem_in_error(const SSL *s);
-void statem_set_in_init(SSL *s, int init);
-__owur int statem_app_data_allowed(SSL *s);
+__owur int ossl_statem_accept(SSL *s);
+__owur int ossl_statem_connect(SSL *s);
+void ossl_statem_clear(SSL *s);
+void ossl_statem_set_renegotiate(SSL *s);
+void ossl_statem_set_error(SSL *s);
+int ossl_statem_in_error(const SSL *s);
+void ossl_statem_set_in_init(SSL *s, int init);
+__owur int ossl_statem_app_data_allowed(SSL *s);
#ifndef OPENSSL_NO_SCTP
-void statem_set_sctp_read_sock(SSL *s, int read_sock);
-__owur int statem_in_sctp_read_sock(SSL *s);
+void ossl_statem_set_sctp_read_sock(SSL *s, int read_sock);
+__owur int ossl_statem_in_sctp_read_sock(SSL *s);
#endif
case TLS_ST_CW_FINISHED:
if (s->hit) {
st->hand_state = TLS_ST_OK;
- statem_set_in_init(s, 0);
+ ossl_statem_set_in_init(s, 0);
return WRITE_TRAN_CONTINUE;
} else {
return WRITE_TRAN_FINISHED;
return WRITE_TRAN_CONTINUE;
} else {
st->hand_state = TLS_ST_OK;
- statem_set_in_init(s, 0);
+ ossl_statem_set_in_init(s, 0);
return WRITE_TRAN_CONTINUE;
}
s->rwstate = SSL_READING;
BIO_clear_retry_flags(SSL_get_rbio(s));
BIO_set_retry_read(SSL_get_rbio(s));
- statem_set_sctp_read_sock(s, 1);
+ ossl_statem_set_sctp_read_sock(s, 1);
return WORK_MORE_A;
}
- statem_set_sctp_read_sock(s, 0);
+ ossl_statem_set_sctp_read_sock(s, 0);
return WORK_FINISHED_STOP;
#endif
return 1;
err:
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
return MSG_PROCESS_FINISHED_READING;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
err:
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
err:
- statem_set_error(s);
+ ossl_statem_set_error(s);
done:
EVP_PKEY_free(pkey);
X509_free(x);
EC_KEY_free(ecdh);
#endif
EVP_MD_CTX_cleanup(&md_ctx);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
ret = MSG_PROCESS_CONTINUE_READING;
goto done;
err:
- statem_set_error(s);
+ ossl_statem_set_error(s);
done:
sk_X509_NAME_pop_free(ca_sk, X509_NAME_free);
return ret;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
err:
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
return MSG_PROCESS_CONTINUE_READING;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
/* should contain no data */
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR);
SSLerr(SSL_F_TLS_PROCESS_SERVER_DONE, SSL_R_LENGTH_MISMATCH);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
if (SRP_Calc_A_param(s) <= 0) {
SSLerr(SSL_F_TLS_PROCESS_SERVER_DONE, SSL_R_SRP_A_CALC);
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
}
*/
if (!ssl3_check_cert_and_algorithm(s)) {
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_HANDSHAKE_FAILURE);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
OPENSSL_clear_free(s->s3->tmp.psk, s->s3->tmp.psklen);
s->s3->tmp.psk = NULL;
#endif
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
}
if (i == 0) {
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
s->rwstate = SSL_NOTHING;
s->s3->tmp.cert_req = 2;
if (!ssl3_digest_cached_records(s, 0)) {
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
}
2) ? NULL : s->cert->key)) {
SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_CERTIFICATE, ERR_R_INTERNAL_ERROR);
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
return MSG_PROCESS_CONTINUE_READING;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
return MSG_PROCESS_CONTINUE_PROCESSING;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
ssl_update_cache(s, SSL_SESS_CACHE_SERVER);
s->ctx->stats.sess_accept_good++;
- s->handshake_func = statem_accept;
+ s->handshake_func = ossl_statem_accept;
} else {
ssl_update_cache(s, SSL_SESS_CACHE_CLIENT);
if (s->hit)
s->ctx->stats.sess_hit++;
- s->handshake_func = statem_connect;
+ s->handshake_func = ossl_statem_connect;
s->ctx->stats.sess_connect_good++;
}
case TLS_ST_SW_HELLO_REQ:
st->hand_state = TLS_ST_OK;
- statem_set_in_init(s, 0);
+ ossl_statem_set_in_init(s, 0);
return WRITE_TRAN_CONTINUE;
case TLS_ST_SR_CLNT_HELLO:
case TLS_ST_SR_FINISHED:
if (s->hit) {
st->hand_state = TLS_ST_OK;
- statem_set_in_init(s, 0);
+ ossl_statem_set_in_init(s, 0);
return WRITE_TRAN_CONTINUE;
} else if (s->tlsext_ticket_expected) {
st->hand_state = TLS_ST_SW_SESSION_TICKET;
return WRITE_TRAN_FINISHED;
}
st->hand_state = TLS_ST_OK;
- statem_set_in_init(s, 0);
+ ossl_statem_set_in_init(s, 0);
return WRITE_TRAN_CONTINUE;
default:
case TLS_ST_SW_CHANGE:
s->session->cipher = s->s3->tmp.new_cipher;
if (!s->method->ssl3_enc->setup_key_block(s)) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;
}
if (SSL_IS_DTLS(s)) {
if (SSL_export_keying_material(s, sctpauthkey,
sizeof(sctpauthkey), labelbuffer,
sizeof(labelbuffer), NULL, 0, 0) <= 0) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;
}
#endif
if (!s->method->ssl3_enc->change_cipher_state(s,
SSL3_CHANGE_CIPHER_SERVER_WRITE)) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;
}
statem_set_sctp_read_sock(s, 1);
return WORK_MORE_A;
} else {
- statem_set_sctp_read_sock(s, 0);
+ ossl_ossl_statem_set_sctp_read_sock(s, 0);
}
#endif
return WORK_FINISHED_CONTINUE;
{
if (!ssl_set_handshake_header(s, SSL3_MT_HELLO_REQUEST, 0)) {
SSLerr(SSL_F_TLS_CONSTRUCT_HELLO_REQUEST, ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
s->d1->cookie_len > 255) {
SSLerr(SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST,
SSL_R_COOKIE_GEN_CALLBACK_FAILURE);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
err:
- statem_set_error(s);
+ ossl_statem_set_error(s);
sk_SSL_CIPHER_free(ciphers);
return MSG_PROCESS_ERROR;
return WORK_FINISHED_STOP;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;
}
sl = s->session->session_id_length;
if (sl > (int)sizeof(s->session->session_id)) {
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_HELLO, ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
*(p++) = sl;
if (ssl_prepare_serverhello_tlsext(s) <= 0) {
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_HELLO, SSL_R_SERVERHELLO_TLSEXT);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
if ((p =
&al)) == NULL) {
ssl3_send_alert(s, SSL3_AL_FATAL, al);
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_HELLO, ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
l = (p - d);
if (!ssl_set_handshake_header(s, SSL3_MT_SERVER_HELLO, l)) {
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_HELLO, ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
{
if (!ssl_set_handshake_header(s, SSL3_MT_SERVER_DONE, 0)) {
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_DONE, ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
if (!s->s3->tmp.cert_request) {
if (!ssl3_digest_cached_records(s, 0)) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
}
}
BN_CTX_free(bn_ctx);
#endif
EVP_MD_CTX_cleanup(&md_ctx);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
return 1;
err:
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
OPENSSL_clear_free(s->s3->tmp.psk, s->s3->tmp.psklen);
s->s3->tmp.psk = NULL;
#endif
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
if (SSL_export_keying_material(s, sctpauthkey,
sizeof(sctpauthkey), labelbuffer,
sizeof(labelbuffer), NULL, 0, 0) <= 0) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;;
}
statem_set_sctp_read_sock(s, 1);
return WORK_MORE_B;
} else {
- statem_set_sctp_read_sock(s, 0);
+ ossl_statem_set_sctp_read_sock(s, 0);
}
#endif
if (!s->s3->handshake_buffer) {
SSLerr(SSL_F_TLS_POST_PROCESS_CLIENT_KEY_EXCHANGE,
ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;
}
/*
* extms we've done this already so this is a no-op
*/
if (!ssl3_digest_cached_records(s, 1)) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;
}
} else {
* step
*/
if (!ssl3_digest_cached_records(s, 0)) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;
}
for (dgst_num = 0; dgst_num < SSL_MAX_DIGEST; dgst_num++) {
dgst_size =
EVP_MD_CTX_size(s->s3->handshake_dgst[dgst_num]);
if (dgst_size < 0) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return WORK_ERROR;
}
offset += dgst_size;
if (0) {
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
- statem_set_error(s);
+ ossl_statem_set_error(s);
}
BIO_free(s->s3->handshake_buffer);
s->s3->handshake_buffer = NULL;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
- statem_set_error(s);
+ ossl_statem_set_error(s);
done:
X509_free(x);
sk_X509_pop_free(sk, X509_free);
cpk = ssl_get_server_send_pkey(s);
if (cpk == NULL) {
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_CERTIFICATE, ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
if (!ssl3_output_cert_chain(s, cpk)) {
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_CERTIFICATE, ERR_R_INTERNAL_ERROR);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
* long
*/
if (slen_full == 0 || slen_full > 0xFF00) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
senc = OPENSSL_malloc(slen_full);
if (!senc) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
OPENSSL_free(senc);
EVP_CIPHER_CTX_cleanup(&ctx);
HMAC_CTX_cleanup(&hctx);
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
* + (ocsp response)
*/
if (!BUF_MEM_grow(s->init_buf, 8 + s->tlsext_ocsp_resplen)) {
- statem_set_error(s);
+ ossl_statem_set_error(s);
return 0;
}
return MSG_PROCESS_CONTINUE_READING;
err:
- statem_set_error(s);
+ ossl_statem_set_error(s);
return MSG_PROCESS_ERROR;
}
#endif