1SSL_SESSION_GET_PROTOCOL_VERSION(3) OpenSSLSSL_SESSION_GET_PROTOCOL_VERSION(3)
2
3
4
6 SSL_SESSION_get_protocol_version, SSL_SESSION_set_protocol_version -
7 get and set the session protocol version
8
10 #include <openssl/ssl.h>
11
12 int SSL_SESSION_get_protocol_version(const SSL_SESSION *s);
13 int SSL_SESSION_set_protocol_version(SSL_SESSION *s, int version);
14
16 SSL_SESSION_get_protocol_version() returns the protocol version number
17 used by session s.
18
19 SSL_SESSION_set_protocol_version() sets the protocol version associated
20 with the SSL_SESSION object s to the value version. This value should
21 be a version constant such as TLS1_3_VERSION etc. For example, this
22 could be used to set up a session based PSK (see
23 SSL_CTX_set_psk_use_session_callback(3)).
24
26 SSL_SESSION_get_protocol_version() returns a number indicating the
27 protocol version used for the session; this number matches the
28 constants e.g. TLS1_VERSION, TLS1_2_VERSION or TLS1_3_VERSION.
29
30 Note that the SSL_SESSION_get_protocol_version() function does not
31 perform a null check on the provided session s pointer.
32
33 SSL_SESSION_set_protocol_version() returns 1 on success or 0 on
34 failure.
35
37 ssl(7), SSL_CTX_set_psk_use_session_callback(3)
38
40 The SSL_SESSION_get_protocol_version() function was added in OpenSSL
41 1.1.0. The SSL_SESSION_set_protocol_version() function was added in
42 OpenSSL 1.1.1.
43
45 Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
46
47 Licensed under the OpenSSL license (the "License"). You may not use
48 this file except in compliance with the License. You can obtain a copy
49 in the file LICENSE in the source distribution or at
50 <https://www.openssl.org/source/license.html>.
51
52
53
541.1.1q 2022-07-21SSL_SESSION_GET_PROTOCOL_VERSION(3)