1 .\" $OpenBSD: SSL_CIPHER_get_name.3,v 1.2 2016/11/29 19:18:52 schwarze Exp $
2 .\" OpenSSL 45f55f6a Nov 30 15:35:22 2014 +0100
4 .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
5 .\" Copyright (c) 2000, 2001, 2005, 2009, 2013, 2014 The OpenSSL Project.
6 .\" All rights reserved.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in
17 .\" the documentation and/or other materials provided with the
20 .\" 3. All advertising materials mentioning features or use of this
21 .\" software must display the following acknowledgment:
22 .\" "This product includes software developed by the OpenSSL Project
23 .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
25 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26 .\" endorse or promote products derived from this software without
27 .\" prior written permission. For written permission, please contact
28 .\" openssl-core@openssl.org.
30 .\" 5. Products derived from this software may not be called "OpenSSL"
31 .\" nor may "OpenSSL" appear in their names without prior written
32 .\" permission of the OpenSSL Project.
34 .\" 6. Redistributions of any form whatsoever must retain the following
36 .\" "This product includes software developed by the OpenSSL Project
37 .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
39 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
40 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
43 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
52 .Dd $Mdocdate: November 29 2016 $
53 .Dt SSL_CIPHER_GET_NAME 3
56 .Nm SSL_CIPHER_get_name ,
57 .Nm SSL_CIPHER_get_bits ,
58 .Nm SSL_CIPHER_get_version ,
59 .Nm SSL_CIPHER_description
60 .Nd get SSL_CIPHER properties
64 .Fn SSL_CIPHER_get_name "const SSL_CIPHER *cipher"
66 .Fn SSL_CIPHER_get_bits "const SSL_CIPHER *cipher" "int *alg_bits"
68 .Fn SSL_CIPHER_get_version "const SSL_CIPHER *cipher"
70 .Fn SSL_CIPHER_description "const SSL_CIPHER *cipher" "char *buf" "int size"
72 .Fn SSL_CIPHER_get_name
73 returns a pointer to the name of
82 .Fn SSL_CIPHER_get_bits
83 returns the number of secret bits used for
89 it contains the number of bits processed by the
97 .Fn SSL_CIPHER_get_version
98 returns a string which indicates the SSL/TLS protocol version that first
102 In some cases it should possibly return
104 but the function does not; use
105 .Xr SSL_CIPHER_description 3
114 .Fn SSL_CIPHER_description
115 returns a textual description of the cipher used into the buffer
124 a buffer is allocated using
126 that buffer should be freed using the
135 and the allocation fails, a pointer to the string
139 The string returned by
140 .Fn SSL_CIPHER_description
141 consists of several fields separated by whitespace:
144 Textual representation of the cipher name.
145 .It Aq Ar protocol version
150 The TLSv1.0 ciphers are flagged with SSLv3.
151 No new ciphers were added by TLSv1.1.
152 .It Kx= Ns Aq Ar key exchange
159 .It Au= Ns Aq Ar authentication
160 Authentication method:
168 is the representation of anonymous ciphers.
169 .It Enc= Ns Aq Ar symmetric encryption method
170 Encryption method with number of secret bits:
182 .Sy ChaCha20-Poly1305 ,
183 .Sy ChaCha20-Poly1305-Old ,
184 .Sy GOST-28178-89-CNT ,
187 .It Mac= Ns Aq Ar message authentication code
200 An example for the output of
201 .Fn SSL_CIPHER_description :
203 ECDHE-RSA-AES256-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
206 A complete list can be retrieved by invoking the following command:
208 .Dl $ openssl ciphers -v ALL
212 .Xr SSL_get_ciphers 3 ,
213 .Xr SSL_get_current_cipher 3
216 .Fn SSL_CIPHER_description
224 .Fn SSL_CIPHER_description
225 cannot handle a built-in cipher,
226 the according description of the cipher property is
228 This case should not occur.