summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_CIPHER_get_name.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/doc/SSL_CIPHER_get_name.3')
-rw-r--r--src/lib/libssl/doc/SSL_CIPHER_get_name.3193
1 files changed, 193 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_CIPHER_get_name.3 b/src/lib/libssl/doc/SSL_CIPHER_get_name.3
new file mode 100644
index 0000000000..0c6cccd1cc
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_CIPHER_get_name.3
@@ -0,0 +1,193 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_CIPHER_GET_NAME 3
3.Os
4.Sh NAME
5.Nm SSL_CIPHER_get_name ,
6.Nm SSL_CIPHER_get_bits ,
7.Nm SSL_CIPHER_get_version ,
8.Nm SSL_CIPHER_description
9.Nd get SSL_CIPHER properties
10.Sh SYNOPSIS
11.In openssl/ssl.h
12.Ft const char *
13.Fn SSL_CIPHER_get_name "const SSL_CIPHER *cipher"
14.Ft int
15.Fn SSL_CIPHER_get_bits "const SSL_CIPHER *cipher" "int *alg_bits"
16.Ft char *
17.Fn SSL_CIPHER_get_version "const SSL_CIPHER *cipher"
18.Ft char *
19.Fn SSL_CIPHER_description "const SSL_CIPHER *cipher" "char *buf" "int size"
20.Sh DESCRIPTION
21.Fn SSL_CIPHER_get_name
22returns a pointer to the name of
23.Fa cipher .
24If the
25argument is the
26.Dv NULL
27pointer, a pointer to the constant value
28.Qq NONE
29is returned.
30.Pp
31.Fn SSL_CIPHER_get_bits
32returns the number of secret bits used for
33.Fa cipher .
34If
35.Fa alg_bits
36is not
37.Dv NULL ,
38it contains the number of bits processed by the
39chosen algorithm.
40If
41.Fa cipher
42is
43.Dv NULL ,
440 is returned.
45.Pp
46.Fn SSL_CIPHER_get_version
47returns a string which indicates the SSL/TLS protocol version that first
48defined the cipher.
49This is currently
50.Qq SSLv2
51or
52.Qq TLSv1/SSLv3 .
53In some cases it should possibly return
54.Qq TLSv1.2
55but the function does not; use
56.Xr SSL_CIPHER_description 3
57instead.
58If
59.Fa cipher
60is
61.Dv NULL ,
62.Qq (NONE)
63is returned.
64.Pp
65.Fn SSL_CIPHER_description
66returns a textual description of the cipher used into the buffer
67.Fa buf
68of length
69.Fa len
70provided.
71If
72.Fa buf
73is
74.Dv NULL ,
75a buffer is allocated using
76.Xr asprintf 3 ;
77that buffer should be freed using the
78.Xr free 3
79function.
80If
81.Fa len
82is too small, or if
83.Fa buf
84is
85.Dv NULL
86and the allocation fails, a pointer to the string
87.Qq Buffer too small
88is returned.
89.Sh NOTES
90The number of bits processed can be different from the secret bits.
91For example, an export cipher like EXP-RC4-MD5 has only 40 secret bits.
92The algorithm does use the full 128 bits (which would be returned for
93.Fa alg_bits ) ,
94but 88 bits are fixed.
95The search space is hence only 40 bits.
96.Pp
97The string returned by
98.Fn SSL_CIPHER_description
99in case of success consists
100of cleartext information separated by one or more blanks in the following
101sequence:
102.Bl -tag -width Ds
103.It Aq Ar ciphername
104Textual representation of the cipher name.
105.It Aq Ar protocol version
106Protocol version:
107.Em SSLv2 ,
108.Em SSLv3 ,
109.Em TLSv1.2 .
110The TLSv1.0 ciphers are flagged with SSLv3.
111No new ciphers were added by TLSv1.1.
112.It Kx= Ns Aq Ar key exchange
113Key exchange method:
114.Em RSA
115(for export ciphers as
116.Em RSA(512)
117or
118.Em RSA(1024) ) ,
119.Em DH
120(for export ciphers as
121.Em DH(512)
122or
123.Em DH(1024) ) ,
124.Em DH/RSA ,
125.Em DH/DSS ,
126.Em Fortezza .
127.It Au= Ns Aq Ar authentication
128Authentication method:
129.Em RSA ,
130.Em DSS ,
131.Em DH ,
132.Em None .
133.Em None
134is the representation of anonymous ciphers.
135.It Enc= Ns Aq Ar symmetric encryption method
136Encryption method with number of secret bits:
137.Em DES(40) ,
138.Em DES(56) ,
139.Em 3DES(168) ,
140.Em RC4(40) ,
141.Em RC4(56) ,
142.Em RC4(64) ,
143.Em RC4(128) ,
144.Em RC2(40) ,
145.Em RC2(56) ,
146.Em RC2(128) ,
147.Em IDEA(128) ,
148.Em Fortezza ,
149.Em None .
150.It Mac= Ns Aq Ar message authentication code
151Message digest:
152.Em MD5 ,
153.Em SHA1 .
154.It Aq Ar export flag
155If the cipher is flagged exportable with respect to old US crypto
156regulations, the word
157.Dq export
158is printed.
159.El
160.Sh RETURN VALUES
161See
162.Sx DESCRIPTION
163.Sh EXAMPLES
164Some examples for the output of
165.Fn SSL_CIPHER_description :
166.D1 "EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1"
167.D1 "EDH-DSS-DES-CBC3-SHA SSLv3 Kx=DH Au=DSS Enc=3DES(168) Mac=SHA1"
168.D1 "RC4-MD5 SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=MD5"
169.D1 "EXP-RC4-MD5 SSLv3 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export"
170.Pp
171A complete list can be retrieved by invoking the following command:
172.Pp
173.Dl $ openssl ciphers -v ALL
174.Sh SEE ALSO
175.Xr ciphers 1 ,
176.Xr ssl 3 ,
177.Xr SSL_get_ciphers 3 ,
178.Xr SSL_get_current_cipher 3
179.Sh BUGS
180If
181.Fn SSL_CIPHER_description
182is called with
183.Fa cipher
184being
185.Dv NULL ,
186the library crashes.
187.Pp
188If
189.Fn SSL_CIPHER_description
190cannot handle a built-in cipher,
191the according description of the cipher property is
192.Qq unknown .
193This case should not occur.