SSL_COPY_SESSION_ID(3)
π SSL_COPY_SESSION_ID(3) β Library Functions Manual π
β¨ NAME β¨
SSL_copy_session_id β okay so this is the little function that copies session details between SSL objects, periodt.
πΈ SYNOPSIS πΈ
#include <openssl/ssl.h>
int
SSL_copy_session_id(SSL *to, const SSL *from);
π¦ DESCRIPTION π¦
SSL_copy_session_id() is giving βclone the session-ish bits from one SSL object into another.β It copies the following data from from to to:
- the pointer to the
SSL_SESSIONobject β and its reference count gets incremented by1, no cap - the pointer to the
SSL_METHODobject; if that changes the method, protocol-specific data is reinitialized - the pointer to the
CERTobject β reference count incremented by1too, slay - the session ID context
Fun fact iykyk: this function is used internally by SSL_dup(3) and by BIO_ssl_copy_session_id(3).
π RETURN VALUES π
SSL_copy_session_id() returns 1 on success and 0 on error. Thatβs it, bestie.
π 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)
π HISTORY π
SSL_copy_session_id() appeared in SSLeay 0.4 or earlier and has been available since OpenBSD 2.4. lowkey iconic longevity.
π BUGS π
okay so this is the sketchy part: failures ofCRYPTO_add(3)are silently ignored and may leavetoin an invalid or inconsistent state. not the vibe.
source/version + date sign-off: source/version: Debian Β· date: June 12, 2019 Β· page name: SSL_COPY_SESSION_ID(3) ππ«Ά
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· 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