]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/SSL_SESSION_get0_cipher.pod
Update copyright year
[thirdparty/openssl.git] / doc / man3 / SSL_SESSION_get0_cipher.pod
CommitLineData
e9281323
RS
1=pod
2
3=head1 NAME
4
7721978c
MC
5SSL_SESSION_get0_cipher,
6SSL_SESSION_set_cipher
7- set and retrieve the SSL cipher associated with a session
e9281323
RS
8
9=head1 SYNOPSIS
10
11 #include <openssl/ssl.h>
12
d42e7759 13 const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s);
7721978c 14 int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher);
e9281323
RS
15
16=head1 DESCRIPTION
17
18SSL_SESSION_get0_cipher() retrieves the cipher that was used by the
19connection when the session was created, or NULL if it cannot be determined.
20
21The value returned is a pointer to an object maintained within B<s> and
22should not be released.
23
7721978c
MC
24SSL_SESSION_set_cipher() can be used to set the ciphersuite associated with the
25SSL_SESSION B<s> to B<cipher>. For example, this could be used to set up a
26session based PSK (see L<SSL_CTX_set_psk_use_session_callback(3)>).
27
28=head1 RETURN VALUES
29
30SSL_SESSION_get0_cipher() returns the SSL_CIPHER associated with the SSL_SESSION
31or NULL if it cannot be determined.
32
33SSL_SESSION_set_cipher() returns 1 on success or 0 on failure.
34
e9281323
RS
35=head1 SEE ALSO
36
b97fdb57 37L<ssl(7)>,
e9281323
RS
38L<d2i_SSL_SESSION(3)>,
39L<SSL_SESSION_get_time(3)>,
40L<SSL_SESSION_get0_hostname(3)>,
7721978c
MC
41L<SSL_SESSION_free(3)>,
42L<SSL_CTX_set_psk_use_session_callback(3)>
e9281323
RS
43
44=head1 HISTORY
45
df75c2bf
DMSP
46The SSL_SESSION_get0_cipher() function was added in OpenSSL 1.1.0.
47The SSL_SESSION_set_cipher() function was added in OpenSSL 1.1.1.
e9281323
RS
48
49=head1 COPYRIGHT
50
7721978c 51Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
e9281323
RS
52
53Licensed under the OpenSSL license (the "License"). You may not use
54this file except in compliance with the License. You can obtain a copy
55in the file LICENSE in the source distribution or at
56L<https://www.openssl.org/source/license.html>.
57
58=cut