diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-04-18 19:30:54 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-05-12 14:47:11 +0100 |
commit | f20fdd16d817a095f58f9c016044abef24e50e58 (patch) | |
tree | 24d8ac2709db424c03f1825f02a9ab4ba25a25c7 /ssl/quic/quic_impl.c | |
parent | 2dbc39deacf9d5850eecef515cbc50331750dd22 (diff) |
QUIC CHANNEL: Handle incoming remotely-created streams
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)
Diffstat (limited to 'ssl/quic/quic_impl.c')
-rw-r--r-- | ssl/quic/quic_impl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 0dd6576633..41de167dd2 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -296,6 +296,15 @@ void ossl_quic_free(SSL *s) ctx.xso->stream->deleted = 1; + /* Auto-conclude stream. */ + /* TODO(QUIC): Do RESET_STREAM here instead of auto-conclude */ + if (ctx.xso->stream->sstream != NULL) + ossl_quic_sstream_fin(ctx.xso->stream->sstream); + + /* Update stream state. */ + ossl_quic_stream_map_update_state(ossl_quic_channel_get_qsm(ctx.xso->conn->ch), + ctx.xso->stream); + quic_unlock(ctx.qc); /* Note: SSL_free calls OPENSSL_free(xso) for us */ @@ -1106,7 +1115,7 @@ SSL *ossl_quic_conn_stream_new(SSL *s, uint64_t flags) xso->blocking = ctx.qc->default_blocking; xso->ssl_mode = ctx.qc->default_ssl_mode; - xso->stream = ossl_quic_channel_new_stream(ctx.qc->ch, is_uni); + xso->stream = ossl_quic_channel_new_stream_local(ctx.qc->ch, is_uni); if (xso->stream == NULL) goto err; |