SSL_STREAM_RESET(3ossl)
π SSL_STREAM_RESET(3ossl) β like, the whole vibe
Hey bestie π«Ά so this is the 3ossl manual page for SSL_stream_reset, and honestly? It's giving "one function, very specific job, zero chill about the details." Let's get into it β¨
πΈ NAME
SSL_stream_reset β reset a QUIC stream. That's it, that's the whole thing, and she ate π
π¦ 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);
Like, copy that exactly, no cap π β uint64_t, const SSL_STREAM_RESET_ARGS *args, size_t args_len, all of it.
π DESCRIPTION
okay so here's the tea β β SSL_stream_reset() resets the send part of a QUIC stream when you call it on a QUIC stream SSL object, or on a QUIC connection SSL object that has a default stream attached. Two valid entry points, one iconique function π₯
If args is non-NULL, then args_len must be set to sizeof(*args). Not vibes, not a guess β literally sizeof(*args). π
quic_error_code is an application-specified error code, and it's gotta be in the range [0, 2**62-1] β yes, that's a real range and yes, you need to respect it ngl. If args is NULL, then a value of 0 is used. Easy mode π
Now the serious part, bestie, pay attention π«Ά β resetting a stream is you telling the app that the sending part of the stream is terminating abnormally. When a stream is reset, the implementation does not guarantee that any data already passed to SSL_write(3) will be received by the peer π« and data already passed to SSL_write(3) but not yet transmitted may or may not be discarded. Likeβ¦ it's giving chaos, honestly.
β οΈ So only reset a stream when the information transmitted on the stream no longer matters β for example, because of an error condition. Do not reset just for funsies. That data might be gone-gone π
Also! 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. Rules are rules, periodt π
And fun fact π you can also trigger a stream reset by calling SSL_free(3) β go read the docs for SSL_free(3) for the deets. iykyk.
Oh, and if it's a bidirectional stream? The receiving part keeps functioning normally. She's fine, she's thriving π
β¨ NOTES
This function corresponds to the QUIC RESET_STREAM frame. Cute, matching, love that for us π
π RETURN VALUES
Returns 1 on success and 0 on failure. Binary queen, no in-between π
This function fails if:
- it's called on a QUIC connection
SSLobject without a default stream attached, or - it's called on a non-QUIC
SSLobject π
And here's the lowkey important bit: after the first call to this function succeeds for a given stream, subsequent calls succeed but are ignored. The application error code that gets used is the one you passed to the first successful call. So like, that first one? Main character energy. The rest are just background extras β
π§ SEE ALSO
π HISTORY
SSL_stream_reset() was added in OpenSSL 3.2. Baby of the family, born in 3.2, already slaying π
π 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 that's the whole page, bestie, you're officially educated πβ¨ this was 3ossl, version 3.5.0, dated 2026-09-25 β go forth and reset responsibly, mwah ππ¦πΈ
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms