1SSL_SESSION_GET0_ID_CONTEXT(3) OpenSSL SSL_SESSION_GET0_ID_CONTEXT(3)
2
3
4
6 SSL_SESSION_get0_id_context, SSL_SESSION_set1_id_context - get and set
7 the SSL ID context associated with a session
8
10 #include <openssl/ssl.h>
11
12 const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s,
13 unsigned int *len)
14 int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx,
15 unsigned int sid_ctx_len);
16
18 See SSL_CTX_set_session_id_context(3) for further details on session ID
19 contexts.
20
21 SSL_SESSION_get0_id_context() returns the ID context associated with
22 the SSL/TLS session s. The length of the ID context is written to *len
23 if len is not NULL.
24
25 The value returned is a pointer to an object maintained within s and
26 should not be released.
27
28 SSL_SESSION_set1_id_context() takes a copy of the provided ID context
29 given in sid_ctx and associates it with the session s. The length of
30 the ID context is given by sid_ctx_len which must not exceed
31 SSL_MAX_SID_CTX_LENGTH bytes.
32
34 SSL_SESSION_set1_id_context() returns 1 on success or 0 on error.
35
37 ssl(7), SSL_set_session_id_context(3)
38
40 The SSL_SESSION_get0_id_context() function was added in OpenSSL 1.1.0.
41
43 Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
44
45 Licensed under the OpenSSL license (the "License"). You may not use
46 this file except in compliance with the License. You can obtain a copy
47 in the file LICENSE in the source distribution or at
48 <https://www.openssl.org/source/license.html>.
49
50
51
521.1.1q 2022-07-07 SSL_SESSION_GET0_ID_CONTEXT(3)