blob: de46f3d21c389e412f1cd1461fd8c4581b24bd07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
.\"
.\" $OpenBSD: SSL_get_current_cipher.3,v 1.1 2016/11/05 15:32:20 schwarze Exp $
.\"
.Dd $Mdocdate: November 5 2016 $
.Dt SSL_GET_CURRENT_CIPHER 3
.Os
.Sh NAME
.Nm SSL_get_current_cipher ,
.Nm SSL_get_cipher ,
.Nm SSL_get_cipher_name ,
.Nm SSL_get_cipher_bits ,
.Nm SSL_get_cipher_version
.Nd get SSL_CIPHER of a connection
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft SSL_CIPHER *
.Fn SSL_get_current_cipher "const SSL *ssl"
.Fd #define SSL_get_cipher(s) SSL_CIPHER_get_name(SSL_get_current_cipher(s))
.Fd #define SSL_get_cipher_name(s) \
SSL_CIPHER_get_name(SSL_get_current_cipher(s))
.Fd #define SSL_get_cipher_bits(s,np) \
SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)
.Fd #define SSL_get_cipher_version(s) \
SSL_CIPHER_get_version(SSL_get_current_cipher(s))
.Sh DESCRIPTION
.Fn SSL_get_current_cipher
returns a pointer to an
.Vt SSL_CIPHER
object containing the description of the actually used cipher of a connection
established with the
.Fa ssl
object.
.Pp
.Fn SSL_get_cipher
and
.Fn SSL_get_cipher_name
are identical macros to obtain the name of the currently used cipher.
.Fn SSL_get_cipher_bits
is a macro to obtain the number of secret/algorithm bits used and
.Fn SSL_get_cipher_version
returns the protocol name.
See
.Xr SSL_CIPHER_get_name 3
for more details.
.Sh RETURN VALUES
.Fn SSL_get_current_cipher
returns the cipher actually used or
.Dv NULL ,
when no session has been established.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CIPHER_get_name 3
|