LIBRESSL-SSL_SESSION_SET1_ID_CONTEXT(3)
β¨ NAME β¨
SSL_SESSION_get0_id_context, SSL_SESSION_set1_id_context β get and set the SSL ID context associated with a session π
πΈ SYNOPSIS πΈ
library βlibsslβ libcrypto
#include <openssl/ssl.h>
const unsigned char *
SSL_SESSION_get0_id_context(const SSL_SESSION *s, unsigned int *len);
int
SSL_SESSION_set1_id_context(SSL_SESSION *s,
const unsigned char *sid_ctx, unsigned int sid_ctx_len);
π DESCRIPTION π
okay so SSL_SESSION_get0_id_context() hands you back the ID context associated with s. The length of that ID context in bytes gets written to *len β but only if len is not NULL. no cap π¦
SSL_SESSION_set1_id_context() takes a copy of the ID context you pass in sid_ctx and associates it with the session s. The length of the ID context is sid_ctx_len, and bestie, it must not exceed SSL_MAX_SID_CTX_LENGTH bytes. that's the vibe check it has to pass π
β RETURN VALUES β
SSL_SESSION_get0_id_context()β returns an internal pointer to an object maintained withinsthat should not be freed by the caller. leave it alone, she's internal πSSL_SESSION_set1_id_context()β returns1on success or0on error. periodt β¨
π¦ SEE ALSO π¦
π HISTORY π
SSL_SESSION_set1_id_context()first appeared in OpenSSL1.0.1and has been available since OpenBSD5.3.SSL_SESSION_get0_id_context()first appeared in OpenSSL1.1.0and has been available since OpenBSD6.3.
xoxo, from the Debian edition, dated June 8, 2025, page SSL_SESSION_SET1_ID_CONTEXT(3) β mwah πβ¨
π¦ 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) 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