SSL_SESSION_GET_COMPRESS_ID(3SSL)

✨ SSL_SESSION_get_compress_id ✨

okay bestie, welcome to the manual page for SSL_SESSION_get_compress_id from the OpenSSL fam πŸ’– this one lives in the 3SSL manual section, and it's literally so simple it's almost rude. let's get into it 🫢


🌸 NAME 🌸

SSL_SESSION_get_compress_id β€” get the deets about the compression that's linked to a session πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <openssl/ssl.h>

unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);

like, that's the whole vibe. one include, one function, no drama πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: if compression has actually been negotiated for an SSL session, then SSL_SESSION_get_compress_id() will hand you back the id for that compression method πŸ”₯. and if compression did not get negotiated? you get 0. that's it. that's the whole function.

and the only built-in compression method that's supported is zlib, which has an id of 1 β€” so if you see a 1 come back, that's zlib, no cap πŸ‘‘


⭐ RETURN VALUES ⭐

SSL_SESSION_get_compress_id() returns the id of the compression method, or 0 if there isn't one. simple as πŸ“


🌈 SEE ALSO 🌈

  • ssl(7) β€” go read it, iykyk πŸ“š

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


and that's the whole page, bestie πŸ’– this was version 4.0.3, dated 2026-09-29, and it's giving "short and iconic" β€” we love a low-maintenance function that still ate πŸŒΈπŸ’…βœ¨

πŸ“¦ where this page comes from