SSL_STREAM_RESET(3ossl)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸŽ€ NAME πŸŽ€

SSL_stream_reset β€” reset a QUIC stream.

okay bestie, welcome to the SSL_STREAM_RESET(3ossl) page πŸ’– this one is short but lowkey important, so grab your iced coffee and let's get into it.


✨ 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 πŸ’–

okay so the SSL_stream_reset() function resets the send part of a QUIC stream when it's called on a QUIC stream SSL object, or on a QUIC connection SSL object with a default stream attached. main character energy, but make it extremely specific ✨

If args is non-NULL, args_len must be set to sizeof(*args).

quic_error_code is an application-specified error code, and it must be in the range [0, 2**62-1]. If args is NULL, a value of 0 is used.

Resetting a stream indicates to an application 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. So bestie, only reset a stream when the information transmitted on the stream no longer matters β€” for example, due to an error condition. Not me resetting a stream just for the vibe πŸ™ˆ

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 is also possible to trigger a stream reset by calling SSL_free(3); see the documentation for SSL_free(3) for details.

The receiving part of the stream (for bidirectional streams) continues to function normally. She's still working, okay? πŸ’…


πŸ¦‹ NOTES πŸ¦‹

This function corresponds to the QUIC RESET_STREAM frame. iykyk.


⭐ RETURN VALUES ⭐

Returns 1 on success and 0 on failure.

This function fails if called on a QUIC connection SSL object without a default stream attached, or on a non-QUIC SSL object. so pls don't try it on just anything πŸ’€

After the first call to this function succeeds for a given stream, subsequent calls succeed but are ignored. The application error code used is that passed to the first successful call to this function. first one ate, the rest are just standing there 🫢


🌈 SEE ALSO 🌈


πŸ”₯ HISTORY πŸ”₯

SSL_stream_reset() was added in OpenSSL 3.2. iconic behavior, honestly πŸ‘‘


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 SSL_STREAM_RESET(3ossl) page πŸ’– this doc drop is from OpenSSL 3.5.6, dated 2026-04-07 β€” go forth and reset responsibly, mwah πŸ’…βœ¨

πŸ“¦ where this page comes from