SSL_SESSION_GET_ID(3)
β¨ NAME β¨
Okay so bestie, welcome to the SSL_SESSION_GET_ID(3) page β yes, that's the manual name, from the Library Functions Manual β and it's giving the get-and-set duo for the SSL session ID: SSL_SESSION_get_id and SSL_SESSION_set1_id. Slay. π
πΈ SYNOPSIS πΈ
No cap, here's the exact synopsis block β formatting kept exactly as-is, bestie:
library βlibsslβ libcrypto #include <openssl/ssl.h>
const unsigned char *
SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len);
int
SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid,
unsigned int sid_len);
π DESCRIPTION π
Now for the vibe check. SSL_SESSION_get_id() returns a pointer to the internal session ID value for the session s. The length of the ID in bytes is stored in *len β the way that works is lowkey cute. The length may be 0. The caller should not free the returned pointer directly β highkey do not do it, bestie. π«π
SSL_SESSION_set1_id() sets the session ID for s to a copy of sid of length sid_len. It's a copy situation, iykyk. π¦
β RETURN VALUES β
Return-value tea, served hot:
SSL_SESSION_get_id()β returns a pointer to the session ID value. You get the pointer, periodt. πSSL_SESSION_set1_id()β returns1for success and0for failure, for example if the supplied session ID length exceedsSSL_MAX_SSL_SESSION_ID_LENGTH. Ngl, that cap is real, bestie β exceeding it is a no. π
π₯ SEE ALSO π₯
Obsessed with cross-references? Same. Go read these next: ssl(3), SSL_copy_session_id(3), SSL_get_session(3), SSL_SESSION_get_compress_id(3), SSL_SESSION_get_protocol_version(3), SSL_SESSION_has_ticket(3), SSL_SESSION_new(3). Fr fr, the whole squad is here. π«Ά
π HISTORY π
History lesson, because we love lore:
SSL_SESSION_get_id()β first appeared in OpenSSL0.9.8and has been available since OpenBSD4.5. βSSL_SESSION_set1_id()β first appeared in OpenSSL1.1.0and has been available since OpenBSD6.3. π
xoxo, this page ate β it's from Debian, dated June 8, 2025, and the manual page is SSL_SESSION_GET_ID(3) β periodt. π
π«Ά
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2016, 2017 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms