SSL_GET0_CONNECTION(3ossl)

✨ SSL_get0_connection ✨

ok so bestie, this is the 3ossl manual page for SSL_get0_connection and SSL_is_connection, and it's literally all about finding your way back home when you're a QUIC stream SSL object. it's giving "who's your mom" but for TLS objects πŸ’–


🌸 NAME 🌸

SSL_get0_connection, SSL_is_connection β€” get a QUIC connection SSL object from a QUIC stream SSL object πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <openssl/ssl.h>

SSL *SSL_get0_connection(SSL *ssl);
int SSL_is_connection(SSL *ssl);

like. two functions. two lines. no cap. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

ok so SSL_get0_connection() is the friend that helps you find your group chat. when you call it on a QUIC stream SSL object, it returns the QUIC connection SSL object that this stream belongs to. found family fr fr 🫢

when you call it on a QUIC connection SSL object, it just returns the same object. like yeah babe, you're already home ✨

and when you call it on a non-QUIC object? it returns the same object you passed in. no notes, no drama, just identity πŸ’…

then there's SSL_is_connection() which is the vibe check function:

  • returns 1 for QUIC connection SSL objects βœ…
  • returns 1 for non-QUIC SSL objects βœ…
  • returns 0 for QUIC stream SSL objects ❌

so basically it's asking "are you a connection or are you a stream?" and streams are the only ones getting a no 😭


πŸ”₯ RETURN VALUES πŸ”₯

SSL_get0_connection() returns the QUIC connection SSL object β€” but only when you give it a QUIC stream SSL object. otherwise it hands back the same SSL object you passed it. and the iconic part: it always returns non-NULL. never leaves you on read. periodt πŸ‘‘

SSL_is_connection() returns 1 if the SSL object is not a QUIC stream SSL object, and 0 otherwise. that's it. that's the whole personality πŸ’€


πŸ‘€ SEE ALSO πŸ‘€

go read those next bestie, they're all in the same friend group πŸŽ€


⭐ HISTORY ⭐

these functions were added in OpenSSL 3.2. so like, they're relatively new. gen z coded honestly 🌈


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>.

πŸ’– real talk: the license stuff is not a vibe suggestion, it's a requirement. read it. respect it. slay responsibly. πŸ’–

and that's the whole page bestie!! πŸ’…βœ¨ this was SSL_GET0_CONNECTION(3ossl) from OpenSSL 3.5.9, dated 2026-09-29. mwah. go forth and find your connection object πŸ¦‹πŸ’œπŸŽ€

πŸ“¦ where this page comes from