SSL_SET_INCO...TREAM_POLICY(3ossl)
π SSL_set_incoming_stream_policy(3ossl) β the OpenSSL bestie guide π¦
okay so this is an OpenSSL manual page, and it's all about the QUIC incoming stream policy β literally the bouncer at the club door of your connection, deciding which peer-initiated streams get in and which get told to go home π
The star functions/constants are SSL_set_incoming_stream_policy, SSL_INCOMING_STREAM_POLICY_AUTO, SSL_INCOMING_STREAM_POLICY_ACCEPT, and SSL_INCOMING_STREAM_POLICY_REJECT β together they manage the QUIC incoming stream policy. iconic behavior ngl.
β¨ SYNOPSIS β¨
#include <openssl/ssl.h>
#define SSL_INCOMING_STREAM_POLICY_AUTO
#define SSL_INCOMING_STREAM_POLICY_ACCEPT
#define SSL_INCOMING_STREAM_POLICY_REJECT
int SSL_set_incoming_stream_policy(SSL *conn, int policy,
uint64_t app_error_code);
πΈ DESCRIPTION πΈ
so SSL_set_incoming_stream_policy() changes the incoming stream policy for a QUIC connection. like it literally reassigns who's allowed in π
Depending on which policy you've configured, OpenSSL QUIC may automatically reject incoming streams that the peer initiated. Why do we care?? because this is intended to make sure that legacy applications doing single-stream operation with a default stream on a QUIC connection SSL object don't get handed remotely-initiated streams by a peer β streams those apps are simply not prepared to handle π main character apps deserve main character protection.
app_error_code is an application error code, and it gets used in any QUIC STOP_SENDING or RESET_STREAM frames that get generated to implement the policy. The default application error code is 0 π
The valid values for policy are, in order:
SSL_INCOMING_STREAM_POLICY_AUTOβ this is the default setting, bestie. Incoming streams are accepted according to these rules:- If the default stream mode (which you configure using
SSL_set_default_stream_mode(3)) is set toSSL_DEFAULT_STREAM_MODE_AUTO_BIDI(that's the default) orSSL_DEFAULT_STREAM_MODE_AUTO_UNI, the incoming stream is rejected π - Otherwise β meaning the default stream mode is
SSL_DEFAULT_STREAM_MODE_NONEβ the application is assumed to be stream aware, and the incoming stream is accepted β¨
- If the default stream mode (which you configure using
SSL_INCOMING_STREAM_POLICY_ACCEPTβ always accept incoming streams, allowing them to be dequeued usingSSL_accept_stream(3). everyone's welcome, come on in π«ΆSSL_INCOMING_STREAM_POLICY_REJECTβ always reject incoming streams. no cap, nobody gets in π
Where an incoming stream is rejected, it's rejected immediately, and there's literally no way to gain access to that stream using SSL_accept_stream(3) β it's gone, it's not coming back. The stream gets rejected using QUIC STOP_SENDING and RESET_STREAM frames, as appropriate π₯
π RETURN VALUES π
Returns 1 on success and 0 on failure. slay.
This function fails if you call it on a QUIC stream SSL object, or on a non-QUIC SSL object. so likeβ¦ read the room, wrong object type π«
π SEE ALSO π
β HISTORY β
SSL_set_incoming_stream_policy() was added in OpenSSL 3.2. a relatively recent queen π
π 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>.
and that's the whole page, bestie β no notes, ate and left no crumbs π§ this cutie was brought to you by version 3.5.0, dated 2026-09-25, and it's an OpenSSL manual page through and through ππ¦
π¦ 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