mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
QUIC CHANNEL: Do not copy terminate cause as it is not modified after termination
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20765)
This commit is contained in:
parent
b89c81e43b
commit
723cbe8a73
@ -257,7 +257,8 @@ QUIC_STREAM *ossl_quic_channel_get_stream_by_id(QUIC_CHANNEL *ch,
|
||||
|
||||
/* Returns 1 if channel is terminating or terminated. */
|
||||
int ossl_quic_channel_is_term_any(const QUIC_CHANNEL *ch);
|
||||
QUIC_TERMINATE_CAUSE ossl_quic_channel_get_terminate_cause(const QUIC_CHANNEL *ch);
|
||||
const QUIC_TERMINATE_CAUSE *
|
||||
ossl_quic_channel_get_terminate_cause(const QUIC_CHANNEL *ch);
|
||||
int ossl_quic_channel_is_terminating(const QUIC_CHANNEL *ch);
|
||||
int ossl_quic_channel_is_terminated(const QUIC_CHANNEL *ch);
|
||||
int ossl_quic_channel_is_active(const QUIC_CHANNEL *ch);
|
||||
|
@ -71,7 +71,8 @@ int ossl_quic_tserver_is_handshake_confirmed(const QUIC_TSERVER *srv);
|
||||
/* Returns 1 if the server is in any terminating or terminated state */
|
||||
int ossl_quic_tserver_is_term_any(const QUIC_TSERVER *srv);
|
||||
|
||||
QUIC_TERMINATE_CAUSE ossl_quic_tserver_get_terminate_cause(const QUIC_TSERVER *srv);
|
||||
const QUIC_TERMINATE_CAUSE *
|
||||
ossl_quic_tserver_get_terminate_cause(const QUIC_TSERVER *srv);
|
||||
|
||||
/* Returns 1 if the server is in a terminated state */
|
||||
int ossl_quic_tserver_is_terminated(const QUIC_TSERVER *srv);
|
||||
|
@ -445,9 +445,10 @@ int ossl_quic_channel_is_term_any(const QUIC_CHANNEL *ch)
|
||||
|| ossl_quic_channel_is_terminated(ch);
|
||||
}
|
||||
|
||||
QUIC_TERMINATE_CAUSE ossl_quic_channel_get_terminate_cause(const QUIC_CHANNEL *ch)
|
||||
const QUIC_TERMINATE_CAUSE *
|
||||
ossl_quic_channel_get_terminate_cause(const QUIC_CHANNEL *ch)
|
||||
{
|
||||
return ch->terminate_cause;
|
||||
return ossl_quic_channel_is_term_any(ch) ? &ch->terminate_cause : NULL;
|
||||
}
|
||||
|
||||
int ossl_quic_channel_is_handshake_complete(const QUIC_CHANNEL *ch)
|
||||
|
@ -169,7 +169,8 @@ int ossl_quic_tserver_is_term_any(const QUIC_TSERVER *srv)
|
||||
return ossl_quic_channel_is_term_any(srv->ch);
|
||||
}
|
||||
|
||||
QUIC_TERMINATE_CAUSE ossl_quic_tserver_get_terminate_cause(const QUIC_TSERVER *srv)
|
||||
const QUIC_TERMINATE_CAUSE *
|
||||
ossl_quic_tserver_get_terminate_cause(const QUIC_TSERVER *srv)
|
||||
{
|
||||
return ossl_quic_channel_get_terminate_cause(srv->ch);
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ int qtest_shutdown(QUIC_TSERVER *qtserv, SSL *clientssl)
|
||||
|
||||
int qtest_check_server_transport_err(QUIC_TSERVER *qtserv, uint64_t code)
|
||||
{
|
||||
QUIC_TERMINATE_CAUSE cause;
|
||||
const QUIC_TERMINATE_CAUSE *cause;
|
||||
|
||||
ossl_quic_tserver_tick(qtserv);
|
||||
|
||||
@ -323,8 +323,9 @@ int qtest_check_server_transport_err(QUIC_TSERVER *qtserv, uint64_t code)
|
||||
return 0;
|
||||
|
||||
cause = ossl_quic_tserver_get_terminate_cause(qtserv);
|
||||
if (!TEST_true(cause.remote)
|
||||
|| !TEST_uint64_t_eq(cause.error_code, code))
|
||||
if (!TEST_ptr(cause)
|
||||
|| !TEST_true(cause->remote)
|
||||
|| !TEST_uint64_t_eq(cause->error_code, code))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user