Blame doc/man3/SSL_alert_type_string.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
SSL_alert_type_string, SSL_alert_type_string_long, SSL_alert_desc_string, SSL_alert_desc_string_long - get textual description of alert information
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/ssl.h>
Packit c4476c
Packit c4476c
 const char *SSL_alert_type_string(int value);
Packit c4476c
 const char *SSL_alert_type_string_long(int value);
Packit c4476c
Packit c4476c
 const char *SSL_alert_desc_string(int value);
Packit c4476c
 const char *SSL_alert_desc_string_long(int value);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
SSL_alert_type_string() returns a one letter string indicating the
Packit c4476c
type of the alert specified by B<value>.
Packit c4476c
Packit c4476c
SSL_alert_type_string_long() returns a string indicating the type of the alert
Packit c4476c
specified by B<value>.
Packit c4476c
Packit c4476c
SSL_alert_desc_string() returns a two letter string as a short form
Packit c4476c
describing the reason of the alert specified by B<value>.
Packit c4476c
Packit c4476c
SSL_alert_desc_string_long() returns a string describing the reason
Packit c4476c
of the alert specified by B<value>.
Packit c4476c
Packit c4476c
=head1 NOTES
Packit c4476c
Packit c4476c
When one side of an SSL/TLS communication wants to inform the peer about
Packit c4476c
a special situation, it sends an alert. The alert is sent as a special message
Packit c4476c
and does not influence the normal data stream (unless its contents results
Packit c4476c
in the communication being canceled).
Packit c4476c
Packit c4476c
A warning alert is sent, when a non-fatal error condition occurs. The
Packit c4476c
"close notify" alert is sent as a warning alert. Other examples for
Packit c4476c
non-fatal errors are certificate errors ("certificate expired",
Packit c4476c
"unsupported certificate"), for which a warning alert may be sent.
Packit c4476c
(The sending party may however decide to send a fatal error.) The
Packit c4476c
receiving side may cancel the connection on reception of a warning
Packit c4476c
alert on it discretion.
Packit c4476c
Packit c4476c
Several alert messages must be sent as fatal alert messages as specified
Packit c4476c
by the TLS RFC. A fatal alert always leads to a connection abort.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
The following strings can occur for SSL_alert_type_string() or
Packit c4476c
SSL_alert_type_string_long():
Packit c4476c
Packit c4476c
=over 4
Packit c4476c
Packit c4476c
=item "W"/"warning"
Packit c4476c
Packit c4476c
=item "F"/"fatal"
Packit c4476c
Packit c4476c
=item "U"/"unknown"
Packit c4476c
Packit c4476c
This indicates that no support is available for this alert type.
Packit c4476c
Probably B<value> does not contain a correct alert message.
Packit c4476c
Packit c4476c
=back
Packit c4476c
Packit c4476c
The following strings can occur for SSL_alert_desc_string() or
Packit c4476c
SSL_alert_desc_string_long():
Packit c4476c
Packit c4476c
=over 4
Packit c4476c
Packit c4476c
=item "CN"/"close notify"
Packit c4476c
Packit c4476c
The connection shall be closed. This is a warning alert.
Packit c4476c
Packit c4476c
=item "UM"/"unexpected message"
Packit c4476c
Packit c4476c
An inappropriate message was received. This alert is always fatal
Packit c4476c
and should never be observed in communication between proper
Packit c4476c
implementations.
Packit c4476c
Packit c4476c
=item "BM"/"bad record mac"
Packit c4476c
Packit c4476c
This alert is returned if a record is received with an incorrect
Packit c4476c
MAC. This message is always fatal.
Packit c4476c
Packit c4476c
=item "DF"/"decompression failure"
Packit c4476c
Packit c4476c
The decompression function received improper input (e.g. data
Packit c4476c
that would expand to excessive length). This message is always
Packit c4476c
fatal.
Packit c4476c
Packit c4476c
=item "HF"/"handshake failure"
Packit c4476c
Packit c4476c
Reception of a handshake_failure alert message indicates that the
Packit c4476c
sender was unable to negotiate an acceptable set of security
Packit c4476c
parameters given the options available. This is a fatal error.
Packit c4476c
Packit c4476c
=item "NC"/"no certificate"
Packit c4476c
Packit c4476c
A client, that was asked to send a certificate, does not send a certificate
Packit c4476c
(SSLv3 only).
Packit c4476c
Packit c4476c
=item "BC"/"bad certificate"
Packit c4476c
Packit c4476c
A certificate was corrupt, contained signatures that did not
Packit c4476c
verify correctly, etc
Packit c4476c
Packit c4476c
=item "UC"/"unsupported certificate"
Packit c4476c
Packit c4476c
A certificate was of an unsupported type.
Packit c4476c
Packit c4476c
=item "CR"/"certificate revoked"
Packit c4476c
Packit c4476c
A certificate was revoked by its signer.
Packit c4476c
Packit c4476c
=item "CE"/"certificate expired"
Packit c4476c
Packit c4476c
A certificate has expired or is not currently valid.
Packit c4476c
Packit c4476c
=item "CU"/"certificate unknown"
Packit c4476c
Packit c4476c
Some other (unspecified) issue arose in processing the
Packit c4476c
certificate, rendering it unacceptable.
Packit c4476c
Packit c4476c
=item "IP"/"illegal parameter"
Packit c4476c
Packit c4476c
A field in the handshake was out of range or inconsistent with
Packit c4476c
other fields. This is always fatal.
Packit c4476c
Packit c4476c
=item "DC"/"decryption failed"
Packit c4476c
Packit c4476c
A TLSCiphertext decrypted in an invalid way: either it wasn't an
Packit c4476c
even multiple of the block length or its padding values, when
Packit c4476c
checked, weren't correct. This message is always fatal.
Packit c4476c
Packit c4476c
=item "RO"/"record overflow"
Packit c4476c
Packit c4476c
A TLSCiphertext record was received which had a length more than
Packit c4476c
2^14+2048 bytes, or a record decrypted to a TLSCompressed record
Packit c4476c
with more than 2^14+1024 bytes. This message is always fatal.
Packit c4476c
Packit c4476c
=item "CA"/"unknown CA"
Packit c4476c
Packit c4476c
A valid certificate chain or partial chain was received, but the
Packit c4476c
certificate was not accepted because the CA certificate could not
Packit c4476c
be located or couldn't be matched with a known, trusted CA.  This
Packit c4476c
message is always fatal.
Packit c4476c
Packit c4476c
=item "AD"/"access denied"
Packit c4476c
Packit c4476c
A valid certificate was received, but when access control was
Packit c4476c
applied, the sender decided not to proceed with negotiation.
Packit c4476c
This message is always fatal.
Packit c4476c
Packit c4476c
=item "DE"/"decode error"
Packit c4476c
Packit c4476c
A message could not be decoded because some field was out of the
Packit c4476c
specified range or the length of the message was incorrect. This
Packit c4476c
message is always fatal.
Packit c4476c
Packit c4476c
=item "CY"/"decrypt error"
Packit c4476c
Packit c4476c
A handshake cryptographic operation failed, including being
Packit c4476c
unable to correctly verify a signature, decrypt a key exchange,
Packit c4476c
or validate a finished message.
Packit c4476c
Packit c4476c
=item "ER"/"export restriction"
Packit c4476c
Packit c4476c
A negotiation not in compliance with export restrictions was
Packit c4476c
detected; for example, attempting to transfer a 1024 bit
Packit c4476c
ephemeral RSA key for the RSA_EXPORT handshake method. This
Packit c4476c
message is always fatal.
Packit c4476c
Packit c4476c
=item "PV"/"protocol version"
Packit c4476c
Packit c4476c
The protocol version the client has attempted to negotiate is
Packit c4476c
recognized, but not supported. (For example, old protocol
Packit c4476c
versions might be avoided for security reasons). This message is
Packit c4476c
always fatal.
Packit c4476c
Packit c4476c
=item "IS"/"insufficient security"
Packit c4476c
Packit c4476c
Returned instead of handshake_failure when a negotiation has
Packit c4476c
failed specifically because the server requires ciphers more
Packit c4476c
secure than those supported by the client. This message is always
Packit c4476c
fatal.
Packit c4476c
Packit c4476c
=item "IE"/"internal error"
Packit c4476c
Packit c4476c
An internal error unrelated to the peer or the correctness of the
Packit c4476c
protocol makes it impossible to continue (such as a memory
Packit c4476c
allocation failure). This message is always fatal.
Packit c4476c
Packit c4476c
=item "US"/"user canceled"
Packit c4476c
Packit c4476c
This handshake is being canceled for some reason unrelated to a
Packit c4476c
protocol failure. If the user cancels an operation after the
Packit c4476c
handshake is complete, just closing the connection by sending a
Packit c4476c
close_notify is more appropriate. This alert should be followed
Packit c4476c
by a close_notify. This message is generally a warning.
Packit c4476c
Packit c4476c
=item "NR"/"no renegotiation"
Packit c4476c
Packit c4476c
Sent by the client in response to a hello request or by the
Packit c4476c
server in response to a client hello after initial handshaking.
Packit c4476c
Either of these would normally lead to renegotiation; when that
Packit c4476c
is not appropriate, the recipient should respond with this alert;
Packit c4476c
at that point, the original requester can decide whether to
Packit c4476c
proceed with the connection. One case where this would be
Packit c4476c
appropriate would be where a server has spawned a process to
Packit c4476c
satisfy a request; the process might receive security parameters
Packit c4476c
(key length, authentication, etc.) at startup and it might be
Packit c4476c
difficult to communicate changes to these parameters after that
Packit c4476c
point. This message is always a warning.
Packit c4476c
Packit c4476c
=item "UP"/"unknown PSK identity"
Packit c4476c
Packit c4476c
Sent by the server to indicate that it does not recognize a PSK
Packit c4476c
identity or an SRP identity.
Packit c4476c
Packit c4476c
=item "UK"/"unknown"
Packit c4476c
Packit c4476c
This indicates that no description is available for this alert type.
Packit c4476c
Probably B<value> does not contain a correct alert message.
Packit c4476c
Packit c4476c
=back
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<ssl(7)>, L<SSL_CTX_set_info_callback(3)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut