Debian Codegraph @

upstream/debian-unstable/man3/SSL_set_incoming_stream_policy.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "SSL_SET_INCOMING_STREAM_POLICY 3SSL"
58 .TH SSL_SET_INCOMING_STREAM_POLICY 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 SSL_set_incoming_stream_policy, SSL_INCOMING_STREAM_POLICY_AUTO,
65 SSL_INCOMING_STREAM_POLICY_ACCEPT,
66 SSL_INCOMING_STREAM_POLICY_REJECT \- manage the QUIC incoming stream
67 policy
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& #include <openssl/ssl.h>
72 \&
73 \& #define SSL_INCOMING_STREAM_POLICY_AUTO
74 \& #define SSL_INCOMING_STREAM_POLICY_ACCEPT
75 \& #define SSL_INCOMING_STREAM_POLICY_REJECT
76 \&
77 \& int SSL_set_incoming_stream_policy(SSL *conn, int policy,
78 \& uint64_t app_error_code);
79 .Ve
80 .SH DESCRIPTION
81 .IX Header "DESCRIPTION"
82 \&\fBSSL_set_incoming_stream_policy()\fR policy changes the incoming stream policy for a
83 QUIC connection. Depending on the policy configured, OpenSSL QUIC may
84 automatically reject incoming streams initiated by the peer. This is intended to
85 ensure that legacy applications using single-stream operation with a default
86 stream on a QUIC connection SSL object are not passed remotely-initiated streams
87 by a peer which those applications are not prepared to handle.
88 .PP
89 \&\fIapp_error_code\fR is an application error code which will be used in any QUIC
90 \&\fBSTOP_SENDING\fR or \fBRESET_STREAM\fR frames generated to implement the policy. The
91 default application error code is 0.
92 .PP
93 The valid values for \fIpolicy\fR are:
94 .IP SSL_INCOMING_STREAM_POLICY_AUTO 4
95 .IX Item "SSL_INCOMING_STREAM_POLICY_AUTO"
96 This is the default setting. Incoming streams are accepted according to the
97 following rules:
98 .RS 4
99 .IP \(bu 4
100 If the default stream mode (configured using \fBSSL_set_default_stream_mode\fR\|(3))
101 is set to \fBSSL_DEFAULT_STREAM_MODE_AUTO_BIDI\fR (the default) or
102 \&\fBSSL_DEFAULT_STREAM_MODE_AUTO_UNI\fR, the incoming stream is rejected.
103 .IP \(bu 4
104 Otherwise (where the default stream mode is \fBSSL_DEFAULT_STREAM_MODE_NONE\fR),
105 the application is assumed to be stream aware, and the incoming stream is
106 accepted.
107 .RE
108 .RS 4
109 .RE
110 .IP SSL_INCOMING_STREAM_POLICY_ACCEPT 4
111 .IX Item "SSL_INCOMING_STREAM_POLICY_ACCEPT"
112 Always accept incoming streams, allowing them to be dequeued using
113 \&\fBSSL_accept_stream\fR\|(3).
114 .IP SSL_INCOMING_STREAM_POLICY_REJECT 4
115 .IX Item "SSL_INCOMING_STREAM_POLICY_REJECT"
116 Always reject incoming streams.
117 .PP
118 Where an incoming stream is rejected, it is rejected immediately and it is not
119 possible to gain access to the stream using \fBSSL_accept_stream\fR\|(3). The stream
120 is rejected using QUIC \fBSTOP_SENDING\fR and \fBRESET_STREAM\fR frames as
121 appropriate.
122 .SH "RETURN VALUES"
123 .IX Header "RETURN VALUES"
124 Returns 1 on success and 0 on failure.
125 .PP
126 This function fails if called on a QUIC stream SSL object, or on a non-QUIC SSL
127 object.
128 .SH "SEE ALSO"
129 .IX Header "SEE ALSO"
130 \&\fBSSL_set_default_stream_mode\fR\|(3), \fBSSL_accept_stream\fR\|(3)
131 .SH HISTORY
132 .IX Header "HISTORY"
133 \&\fBSSL_set_incoming_stream_policy()\fR was added in OpenSSL 3.2.
134 .SH COPYRIGHT
135 .IX Header "COPYRIGHT"
136 Copyright 2002\-2023 The OpenSSL Project Authors. All Rights Reserved.
137 .PP
138 Licensed under the Apache License 2.0 (the "License"). You may not use
139 this file except in compliance with the License. You can obtain a copy
140 in the file LICENSE in the source distribution or at
141 <https://www.openssl.org/source/license.html>.