1SSL_SESSION_GET0_CIPHER(3)          OpenSSL         SSL_SESSION_GET0_CIPHER(3)
2
3
4

NAME

6       SSL_SESSION_get0_cipher, SSL_SESSION_set_cipher - set and retrieve the
7       SSL cipher associated with a session
8

SYNOPSIS

10        #include <openssl/ssl.h>
11
12        const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s);
13        int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher);
14

DESCRIPTION

16       SSL_SESSION_get0_cipher() retrieves the cipher that was used by the
17       connection when the session was created, or NULL if it cannot be
18       determined.
19
20       The value returned is a pointer to an object maintained within s and
21       should not be released.
22
23       SSL_SESSION_set_cipher() can be used to set the ciphersuite associated
24       with the SSL_SESSION s to cipher. For example, this could be used to
25       set up a session based PSK (see
26       SSL_CTX_set_psk_use_session_callback(3)).
27

RETURN VALUES

29       SSL_SESSION_get0_cipher() returns the SSL_CIPHER associated with the
30       SSL_SESSION or NULL if it cannot be determined.
31
32       SSL_SESSION_set_cipher() returns 1 on success or 0 on failure.
33

SEE ALSO

35       ssl(7), d2i_SSL_SESSION(3), SSL_SESSION_get_time(3),
36       SSL_SESSION_get0_hostname(3), SSL_SESSION_free(3),
37       SSL_CTX_set_psk_use_session_callback(3)
38

HISTORY

40       The SSL_SESSION_get0_cipher() function was added in OpenSSL 1.1.0.  The
41       SSL_SESSION_set_cipher() function was added in OpenSSL 1.1.1.
42
44       Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
45
46       Licensed under the OpenSSL license (the "License").  You may not use
47       this file except in compliance with the License.  You can obtain a copy
48       in the file LICENSE in the source distribution or at
49       <https://www.openssl.org/source/license.html>.
50
51
52
531.1.1i                            2021-07-22        SSL_SESSION_GET0_CIPHER(3)
Impressum