SSL_STREAM_RESET(3SSL)
πΈ NAME πΈ
SSL_stream_reset β okay so literally this is the girl that resets a QUIC stream π
π¦ SYNOPSIS π¦
#include <openssl/ssl.h>
typedef struct ssl_stream_reset_args_st {
uint64_t quic_error_code;
} SSL_STREAM_RESET_ARGS;
int SSL_stream_reset(SSL *ssl,
const SSL_STREAM_RESET_ARGS *args,
size_t args_len);
β¨ DESCRIPTION β¨
So SSL_stream_reset() resets the send part of a QUIC stream, and you can call it when you're working with either:
- a QUIC stream
SSLobject, or - a QUIC connection
SSLobject that has a default stream attached π«Ά
If args is non-NULL, then args_len must be set to sizeof(*args). No exceptions, bestie, that's the vibe check.
quic_error_code is an application-specified error code, and it must live in the range [0, 2**62-1]. If args is NULL? Then a value of 0 gets used. Simple as that. π
Resetting a stream is basically telling an application that the sending part of the stream is terminating abnormally π. And here's the part you need to actually internalize: when a stream is reset, the implementation does not guarantee that any data you already passed to SSL_write(3) will be received by the peer. Also, data already passed to SSL_write(3) but not yet transmitted may or may not be discarded. Like, it's genuinely ambiguous, no cap. So the rule is: only reset a stream when the info you transmitted on that stream no longer matters β for example because of an error condition.
β οΈ This function cannot be called on a unidirectional stream initiated by the peer, because only the sending side of a stream can initiate a stream reset. Periodt.
It's also possible to trigger a stream reset by calling SSL_free(3) β go read the SSL_free(3) docs for the deets, iykyk.
Oh and the receiving part of the stream (for bidirectional streams) keeps functioning normally π. She's fine, she's thriving, she's just not the one getting reset.
π NOTES π
This function corresponds to the QUIC RESET_STREAM frame. That's it, that's the note. π
β RETURN VALUES β
- Returns
1on success and0on failure. Classic binary slay.
This function fails if you call it on:
- a QUIC connection
SSLobject without a default stream attached, or - a non-QUIC
SSLobject. π
And here's a fun one: after the first call to this function succeeds for a given stream, any subsequent calls succeed but are ignored. The application error code that ends up being used is the one passed to the first successful call to this function. So like, the first girl to speak wins, periodt. π
π SEE ALSO π
π HISTORY π
SSL_stream_reset() was added in OpenSSL 3.2. A relatively recent icon, honestly. β¨
π COPYRIGHT π
Copyright 2002-2023 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay bestie that's the whole page, you're officially fluent in SSL_stream_reset π§
this was version 4.0.3, dated 2026-09-29, from the SSL_STREAM_RESET(3SSL) manual β love you, go reset something responsibly ππ¦β¨
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms