]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - ssl/quic/quic_impl.c
QUIC DISPATCH/APL: Implement SSL_get_stream_id
[thirdparty/openssl.git] / ssl / quic / quic_impl.c
index 2f97f7c6b58811eb510973d9bdbb5e1225afb3eb..6a28c00c75ec0572ab18a30060288eaec11a4ef6 100644 (file)
@@ -1867,6 +1867,20 @@ int ossl_quic_get_stream_type(SSL *s)
         return SSL_STREAM_TYPE_WRITE;
 }
 
+/*
+ * SSL_get_stream_id
+ * -----------------
+ */
+uint64_t ossl_quic_get_stream_id(SSL *s)
+{
+    QCTX ctx;
+
+    if (!expect_quic_with_stream(s, /*remote_init=*/-1, &ctx))
+        return UINT64_MAX;
+
+    return ctx.xso->stream->id;
+}
+
 /*
  * QUIC Front-End I/O API: SSL_CTX Management
  * ==========================================