SSL_COPY_SESSION_ID(3)
π SSL_COPY_SESSION_ID(3) π
okay so bestie, we're in SSL_COPY_SESSION_ID territory β that's the <italic>Library Functions Manual</italic> section, so grab a lil snack and let's go π
β¨ NAME β¨
SSL_copy_session_id β the function that copies session deets from one SSL object to another, no cap π«Ά
πΈ SYNOPSIS πΈ
library βlibsslβ libcrypto #include <openssl/ssl.h>
int
SSL_copy_session_id(SSL *to, const SSL *from);
π DESCRIPTION π
k so SSL_copy_session_id() literally takes all this data from from and drops it into to. the way it just⦠copies. iconic.
- the pointer to the
SSL_SESSIONobject, and it increments its reference count by 1 β sharing is caring, but be responsible okay? π - the pointer to the
SSL_METHODobject; and like, heads up, if that changes the method, protocol-specific data gets reinitialized β it's giving fresh start energy β¨ - the pointer to the
CERTobject, again with the reference count bumped by 1 π - the session ID context
fr fr, this function is used internally by SSL_dup(3) and by BIO_ssl_copy_session_id(3) β our behind-the-scenes main character π
β RETURN VALUES β
SSL_copy_session_id() returns 1 when it slays and 0 on error. that's it, that's the whole vibe check π
π¦ SEE ALSO π¦
BIO_ssl_copy_session_id(3), ssl(3), SSL_dup(3), SSL_get_session(3), SSL_SESSION_get_id(3), SSL_SESSION_new(3), SSL_set_session(3), SSL_set_session_id_context(3)
(yes, go read all of them. i'll wait π )
π HISTORY π
SSL_copy_session_id() appeared in SSLeay 0.4 or earlier β like, ancient ancient β and has been available since OpenBSD 2.4. she's been booked and busy for decades at this point π
π BUGS π
ok so this is the part where we get serious for a sec π β failures of CRYPTO_add(3) are silently ignored and may leave to in an invalid or inconsistent state. like, no error, no nothing, just vibes and possibly corruption. be careful bestie π
so yeah that's the whole page π§ mwah, go forth and copy sessions responsibly π
β from your girl, written up for the Debian build, dated June 8, 2025, page SSL_COPY_SESSION_ID(3) π
π¦ 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 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms