1 | =pod
|
---|
2 |
|
---|
3 | =head1 NAME
|
---|
4 |
|
---|
5 | SSL_set_incoming_stream_policy, SSL_INCOMING_STREAM_POLICY_AUTO,
|
---|
6 | SSL_INCOMING_STREAM_POLICY_ACCEPT,
|
---|
7 | SSL_INCOMING_STREAM_POLICY_REJECT - manage the QUIC incoming stream
|
---|
8 | policy
|
---|
9 |
|
---|
10 | =head1 SYNOPSIS
|
---|
11 |
|
---|
12 | #include <openssl/ssl.h>
|
---|
13 |
|
---|
14 | #define SSL_INCOMING_STREAM_POLICY_AUTO
|
---|
15 | #define SSL_INCOMING_STREAM_POLICY_ACCEPT
|
---|
16 | #define SSL_INCOMING_STREAM_POLICY_REJECT
|
---|
17 |
|
---|
18 | int SSL_set_incoming_stream_policy(SSL *conn, int policy,
|
---|
19 | uint64_t app_error_code);
|
---|
20 |
|
---|
21 | =head1 DESCRIPTION
|
---|
22 |
|
---|
23 | SSL_set_incoming_stream_policy() policy changes the incoming stream policy for a
|
---|
24 | QUIC connection. Depending on the policy configured, OpenSSL QUIC may
|
---|
25 | automatically reject incoming streams initiated by the peer. This is intended to
|
---|
26 | ensure that legacy applications using single-stream operation with a default
|
---|
27 | stream on a QUIC connection SSL object are not passed remotely-initiated streams
|
---|
28 | by a peer which those applications are not prepared to handle.
|
---|
29 |
|
---|
30 | I<app_error_code> is an application error code which will be used in any QUIC
|
---|
31 | B<STOP_SENDING> or B<RESET_STREAM> frames generated to implement the policy. The
|
---|
32 | default application error code is 0.
|
---|
33 |
|
---|
34 | The valid values for I<policy> are:
|
---|
35 |
|
---|
36 | =over 4
|
---|
37 |
|
---|
38 | =item SSL_INCOMING_STREAM_POLICY_AUTO
|
---|
39 |
|
---|
40 | This is the default setting. Incoming streams are accepted according to the
|
---|
41 | following rules:
|
---|
42 |
|
---|
43 | =over 4
|
---|
44 |
|
---|
45 | =item *
|
---|
46 |
|
---|
47 | If the default stream mode (configured using L<SSL_set_default_stream_mode(3)>)
|
---|
48 | is set to B<SSL_DEFAULT_STREAM_MODE_AUTO_BIDI> (the default) or
|
---|
49 | B<SSL_DEFAULT_STREAM_MODE_AUTO_UNI>, the incoming stream is rejected.
|
---|
50 |
|
---|
51 | =item *
|
---|
52 |
|
---|
53 | Otherwise (where the default stream mode is B<SSL_DEFAULT_STREAM_MODE_NONE>),
|
---|
54 | the application is assumed to be stream aware, and the incoming stream is
|
---|
55 | accepted.
|
---|
56 |
|
---|
57 | =back
|
---|
58 |
|
---|
59 | =item SSL_INCOMING_STREAM_POLICY_ACCEPT
|
---|
60 |
|
---|
61 | Always accept incoming streams, allowing them to be dequeued using
|
---|
62 | L<SSL_accept_stream(3)>.
|
---|
63 |
|
---|
64 | =item SSL_INCOMING_STREAM_POLICY_REJECT
|
---|
65 |
|
---|
66 | Always reject incoming streams.
|
---|
67 |
|
---|
68 | =back
|
---|
69 |
|
---|
70 | Where an incoming stream is rejected, it is rejected immediately and it is not
|
---|
71 | possible to gain access to the stream using L<SSL_accept_stream(3)>. The stream
|
---|
72 | is rejected using QUIC B<STOP_SENDING> and B<RESET_STREAM> frames as
|
---|
73 | appropriate.
|
---|
74 |
|
---|
75 | =head1 RETURN VALUES
|
---|
76 |
|
---|
77 | Returns 1 on success and 0 on failure.
|
---|
78 |
|
---|
79 | This function fails if called on a QUIC stream SSL object, or on a non-QUIC SSL
|
---|
80 | object.
|
---|
81 |
|
---|
82 | =head1 SEE ALSO
|
---|
83 |
|
---|
84 | L<SSL_set_default_stream_mode(3)>, L<SSL_accept_stream(3)>
|
---|
85 |
|
---|
86 | =head1 HISTORY
|
---|
87 |
|
---|
88 | SSL_set_incoming_stream_policy() was added in OpenSSL 3.2.
|
---|
89 |
|
---|
90 | =head1 COPYRIGHT
|
---|
91 |
|
---|
92 | Copyright 2002-2023 The OpenSSL Project Authors. All Rights Reserved.
|
---|
93 |
|
---|
94 | Licensed under the Apache License 2.0 (the "License"). You may not use
|
---|
95 | this file except in compliance with the License. You can obtain a copy
|
---|
96 | in the file LICENSE in the source distribution or at
|
---|
97 | L<https://www.openssl.org/source/license.html>.
|
---|
98 |
|
---|
99 | =cut
|
---|