1SSL_SESSION_SET1_ID(3ossl)          OpenSSL         SSL_SESSION_SET1_ID(3ossl)
2
3
4

NAME

6       SSL_SESSION_get_id, SSL_SESSION_set1_id - get and set the SSL session
7       ID
8

SYNOPSIS

10        #include <openssl/ssl.h>
11
12        const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
13                                                unsigned int *len);
14        int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid,
15                                unsigned int sid_len);
16

DESCRIPTION

18       SSL_SESSION_get_id() returns a pointer to the internal session id value
19       for the session s. The length of the id in bytes is stored in *len. The
20       length may be 0. The caller should not free the returned pointer
21       directly.
22
23       SSL_SESSION_set1_id() sets the session ID for the ssl SSL/TLS session
24       to sid of length sid_len.
25

RETURN VALUES

27       SSL_SESSION_get_id() returns a pointer to the session id value.
28       SSL_SESSION_set1_id() returns 1 for success and 0 for failure, for
29       example if the supplied session ID length exceeds
30       SSL_MAX_SSL_SESSION_ID_LENGTH.
31

SEE ALSO

33       ssl(7)
34

HISTORY

36       The SSL_SESSION_set1_id() function was added in OpenSSL 1.1.0.
37
39       Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
40
41       Licensed under the Apache License 2.0 (the "License").  You may not use
42       this file except in compliance with the License.  You can obtain a copy
43       in the file LICENSE in the source distribution or at
44       <https://www.openssl.org/source/license.html>.
45
46
47
483.1.1                             2023-08-31        SSL_SESSION_SET1_ID(3ossl)
Impressum