import libssl (LibreSSL 2.5.4)
[unleashed.git] / lib / libssl / man / SSL_alert_type_string.3
blob2f65b45f74f3fba3b6e07a69fe0a13a5ea14c139
1 .\"     $OpenBSD: SSL_alert_type_string.3,v 1.2 2016/12/01 22:46:21 schwarze Exp $
2 .\"     OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3 .\"
4 .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
5 .\" Copyright (c) 2001, 2011 The OpenSSL Project.  All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\"
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\"
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in
16 .\"    the documentation and/or other materials provided with the
17 .\"    distribution.
18 .\"
19 .\" 3. All advertising materials mentioning features or use of this
20 .\"    software must display the following acknowledgment:
21 .\"    "This product includes software developed by the OpenSSL Project
22 .\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23 .\"
24 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25 .\"    endorse or promote products derived from this software without
26 .\"    prior written permission. For written permission, please contact
27 .\"    openssl-core@openssl.org.
28 .\"
29 .\" 5. Products derived from this software may not be called "OpenSSL"
30 .\"    nor may "OpenSSL" appear in their names without prior written
31 .\"    permission of the OpenSSL Project.
32 .\"
33 .\" 6. Redistributions of any form whatsoever must retain the following
34 .\"    acknowledgment:
35 .\"    "This product includes software developed by the OpenSSL Project
36 .\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
37 .\"
38 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
39 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
41 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
42 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
47 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
50 .\"
51 .Dd $Mdocdate: December 1 2016 $
52 .Dt SSL_ALERT_TYPE_STRING.POD 3
53 .Os
54 .Sh NAME
55 .Nm SSL_alert_type_string ,
56 .Nm SSL_alert_type_string_long ,
57 .Nm SSL_alert_desc_string ,
58 .Nm SSL_alert_desc_string_long
59 .Nd get textual description of alert information
60 .Sh SYNOPSIS
61 .In openssl/ssl.h
62 .Ft const char *
63 .Fn SSL_alert_type_string "int value"
64 .Ft const char *
65 .Fn SSL_alert_type_string_long "int value"
66 .Ft const char *
67 .Fn SSL_alert_desc_string "int value"
68 .Ft const char *
69 .Fn SSL_alert_desc_string_long "int value"
70 .Sh DESCRIPTION
71 .Fn SSL_alert_type_string
72 returns a one letter string indicating the type of the alert specified by
73 .Fa value .
74 .Pp
75 .Fn SSL_alert_type_string_long
76 returns a string indicating the type of the alert specified by
77 .Fa value .
78 .Pp
79 .Fn SSL_alert_desc_string
80 returns a two letter string as a short form describing the reason of the alert
81 specified by
82 .Fa value .
83 .Pp
84 .Fn SSL_alert_desc_string_long
85 returns a string describing the reason of the alert specified by
86 .Fa value .
87 .Pp
88 When one side of an SSL/TLS communication wants to inform the peer about
89 a special situation, it sends an alert.
90 The alert is sent as a special message and does not influence the normal data
91 stream (unless its contents results in the communication being canceled).
92 .Pp
93 A warning alert is sent, when a non-fatal error condition occurs.
94 The
95 .Dq close notify
96 alert is sent as a warning alert.
97 Other examples for non-fatal errors are certificate errors
98 .Po
99 .Dq certificate expired ,
100 .Dq unsupported certificate
101 .Pc ,
102 for which a warning alert may be sent.
103 (The sending party may, however, decide to send a fatal error.)
104 The receiving side may cancel the connection on reception of a warning alert at
105 its discretion.
107 Several alert messages must be sent as fatal alert messages as specified
108 by the TLS RFC.
109 A fatal alert always leads to a connection abort.
110 .Sh RETURN VALUES
111 The following strings can occur for
112 .Fn SSL_alert_type_string
114 .Fn SSL_alert_type_string_long :
115 .Bl -tag -width Ds
116 .It \(dqW\(dq/\(dqwarning\(dq
117 .It \(dqF\(dq/\(dqfatal\(dq
118 .It \(dqU\(dq/\(dqunknown\(dq
119 This indicates that no support is available for this alert type.
120 Probably
121 .Fa value
122 does not contain a correct alert message.
125 The following strings can occur for
126 .Fn SSL_alert_desc_string
128 .Fn SSL_alert_desc_string_long :
129 .Bl -tag -width Ds
130 .It \(dqCN\(dq/\(dqclose notify\(dq
131 The connection shall be closed.
132 This is a warning alert.
133 .It \(dqUM\(dq/\(dqunexpected message\(dq
134 An inappropriate message was received.
135 This alert is always fatal and should never be observed in communication
136 between proper implementations.
137 .It \(dqBM\(dq/\(dqbad record mac\(dq
138 This alert is returned if a record is received with an incorrect MAC.
139 This message is always fatal.
140 .It \(dqDF\(dq/\(dqdecompression failure\(dq
141 The decompression function received improper input
142 (e.g., data that would expand to excessive length).
143 This message is always fatal.
144 .It \(dqHF\(dq/\(dqhandshake failure\(dq
145 Reception of a handshake_failure alert message indicates that the sender was
146 unable to negotiate an acceptable set of security parameters given the options
147 available.
148 This is a fatal error.
149 .It \(dqNC\(dq/\(dqno certificate\(dq
150 A client, that was asked to send a certificate, does not send a certificate
151 (SSLv3 only).
152 .It \(dqBC\(dq/\(dqbad certificate\(dq
153 A certificate was corrupt, contained signatures that did not verify correctly,
154 etc.
155 .It \(dqUC\(dq/\(dqunsupported certificate\(dq
156 A certificate was of an unsupported type.
157 .It \(dqCR\(dq/\(dqcertificate revoked\(dq
158 A certificate was revoked by its signer.
159 .It \(dqCE\(dq/\(dqcertificate expired\(dq
160 A certificate has expired or is not currently valid.
161 .It \(dqCU\(dq/\(dqcertificate unknown\(dq
162 Some other (unspecified) issue arose in processing the certificate,
163 rendering it unacceptable.
164 .It \(dqIP\(dq/\(dqillegal parameter\(dq
165 A field in the handshake was out of range or inconsistent with other fields.
166 This is always fatal.
167 .It \(dqDC\(dq/\(dqdecryption failed\(dq
168 A TLSCiphertext decrypted in an invalid way: either it wasn't an even multiple
169 of the block length or its padding values, when checked, weren't correct.
170 This message is always fatal.
171 .It \(dqRO\(dq/\(dqrecord overflow\(dq
172 A TLSCiphertext record was received which had a length more than
173 2^14+2048 bytes, or a record decrypted to a TLSCompressed record with more than
174 2^14+1024 bytes.
175 This message is always fatal.
176 .It \(dqCA\(dq/\(dqunknown CA\(dq
177 A valid certificate chain or partial chain was received,
178 but the certificate was not accepted because the CA certificate could not be
179 located or couldn't be matched with a known, trusted CA.
180 This message is always fatal.
181 .It \(dqAD\(dq/\(dqaccess denied\(dq
182 A valid certificate was received, but when access control was applied,
183 the sender decided not to proceed with negotiation.
184 This message is always fatal.
185 .It \(dqDE\(dq/\(dqdecode error\(dq
186 A message could not be decoded because some field was out of the specified
187 range or the length of the message was incorrect.
188 This message is always fatal.
189 .It \(dqCY\(dq/\(dqdecrypt error\(dq
190 A handshake cryptographic operation failed, including being unable to correctly
191 verify a signature, decrypt a key exchange, or validate a finished message.
192 .It \(dqER\(dq/\(dqexport restriction\(dq
193 A negotiation not in compliance with export restrictions was detected;
194 for example, attempting to transfer a 1024 bit ephemeral RSA key for the
195 RSA_EXPORT handshake method.
196 This message is always fatal.
197 .It \(dqPV\(dq/\(dqprotocol version\(dq
198 The protocol version the client has attempted to negotiate is recognized,
199 but not supported.
200 (For example, old protocol versions might be avoided for security reasons.)
201 This message is always fatal.
202 .It \(dqIS\(dq/\(dqinsufficient security\(dq
203 Returned instead of handshake_failure when a negotiation has failed
204 specifically because the server requires ciphers more secure than those
205 supported by the client.
206 This message is always fatal.
207 .It \(dqIE\(dq/\(dqinternal error\(dq
208 An internal error unrelated to the peer or the correctness of the protocol
209 makes it impossible to continue (such as a memory allocation failure).
210 This message is always fatal.
211 .It \(dqUS\(dq/\(dquser canceled\(dq
212 This handshake is being canceled for some reason unrelated to a protocol
213 failure.
214 If the user cancels an operation after the handshake is complete,
215 just closing the connection by sending a close_notify is more appropriate.
216 This alert should be followed by a close_notify.
217 This message is generally a warning.
218 .It \(dqNR\(dq/\(dqno renegotiation\(dq
219 Sent by the client in response to a hello request or by the server in response
220 to a client hello after initial handshaking.
221 Either of these would normally lead to renegotiation; when that is not
222 appropriate, the recipient should respond with this alert; at that point,
223 the original requester can decide whether to proceed with the connection.
224 One case where this would be appropriate would be where a server has spawned a
225 process to satisfy a request; the process might receive security parameters
226 (key length, authentication, etc.) at startup and it might be difficult to
227 communicate changes to these parameters after that point.
228 This message is always a warning.
229 .It \(dqUP\(dq/\(dqunknown PSK identity\(dq
230 Sent by the server to indicate that it does not recognize a PSK identity or an
231 SRP identity.
232 .It \(dqUK\(dq/\(dqunknown\(dq
233 This indicates that no description is available for this alert type.
234 Probably
235 .Fa value
236 does not contain a correct alert message.
238 .Sh SEE ALSO
239 .Xr ssl 3 ,
240 .Xr SSL_CTX_set_info_callback 3