QUIC: Update API overview document
authorHugo Landau <hlandau@openssl.org>
Wed, 30 Aug 2023 15:22:27 +0000 (16:22 +0100)
committerHugo Landau <hlandau@openssl.org>
Fri, 1 Sep 2023 13:02:54 +0000 (14:02 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21905)

doc/designs/quic-design/quic-api.md

index 3684c958807ade61f990a8c08fb970ba314c4a98..fceacdda6df830aa8929bce152b7b372fcb13ef3 100644 (file)
@@ -51,6 +51,7 @@ designs and the relevant design decisions.
       - [`SSL_is_connection`](#-ssl-is-connection-)
       - [`SSL_get_stream_type`](#-ssl-get-stream-type-)
       - [`SSL_get_stream_id`](#-ssl-get-stream-id-)
+      - [`SSL_is_stream_local`](#-ssl-is-stream-local-)
       - [`SSL_new_stream`](#-ssl-new-stream-)
       - [`SSL_accept_stream`](#-ssl-accept-stream-)
       - [`SSL_get_accept_stream_queue_len`](#-ssl-get-accept-stream-queue-len-)
@@ -88,9 +89,9 @@ for details on SSL object APIs.
 
 | Semantics | API                             | Status |
 |-----------|---------------------------------|--------|
-| TBD       | `BIO_s_connect`                 | TODO  |
-| TBD       | `BIO_set_conn_hostname`         | TODO   |
-| TBD       | `BIO_new_bio_pair`              | TODO   |
+| Changed   | `BIO_s_connect`                 | Done  |
+| Unchanged | `BIO_set_conn_hostname`         | Done   |
+| N/A       | `BIO_new_bio_pair`              | N/A (see `BIO_new_bio_dgram_pair`)   |
 | New       | `BIO_s_dgram_pair`              | Done   |
 | Unchanged | `BIO_dgram_get_mtu`             | Done   |
 | Unchanged | `BIO_dgram_set_mtu`             | Done   |
@@ -982,6 +983,21 @@ __owur int SSL_get_stream_type(SSL *ssl);
 __owur uint64_t SSL_get_stream_id(SSL *ssl);
 ```
 
+#### `SSL_is_stream_local`
+
+| Semantics | `SSL_get_error` | Can Tick? | CSHL          |
+| --------- | ------------- | --------- | ------------- |
+| New       | Never         | No        | S             |
+
+```c
+/*
+ * QUIC: Returns 1 if the stream was locally initiated, or 0 otherwise.
+ *
+ * TLS, DTLS: Returns -1.
+ */
+__owur int SSL_is_stream_local(SSL *ssl);
+```
+
 #### `SSL_new_stream`
 
 | Semantics | `SSL_get_error` | Can Tick? | CSHL          |
@@ -1530,7 +1546,8 @@ calls.
 
 **Q. How should `STOP_SENDING` be supported?**
 
-TODO: Determine how `STOP_SENDING` should be supported.
+We trigger `STOP_SENDING` automatically if an application frees the associated
+QUIC stream SSL object.
 
 **Q. Can data be received on a locally initiated bidirectional stream before any
 data is sent on that stream?**