
#use wml::openssl-macros area=docs page=SSL_alert_type_string

<title>Documents, SSL_alert_type_string(3)</title>

<h1>SSL_alert_type_string(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#NOTES">NOTES</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
SSL_alert_type_string, SSL_alert_type_string_long, SSL_alert_desc_string,
SSL_alert_desc_string_long - get textual description of alert information

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/ssl.h&gt;
</PRE>
<PRE> const char *SSL_alert_type_string(int value);
 const char *SSL_alert_type_string_long(int value);
</PRE>
<PRE> const char *SSL_alert_desc_string(int value);
 const char *SSL_alert_desc_string_long(int value);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>SSL_alert_type_string()</CODE> returns a one letter string indicating
the type of the alert specified by <STRONG>value</STRONG>.

</P>
<P>
<CODE>SSL_alert_type_string_long()</CODE> returns a string indicating the
type of the alert specified by <STRONG>value</STRONG>.

</P>
<P>
<CODE>SSL_alert_desc_string()</CODE> returns a two letter string as a short
form describing the reason of the alert specified by <STRONG>value</STRONG>.

</P>
<P>
<CODE>SSL_alert_desc_string_long()</CODE> returns a string describing the
reason of the alert specified by <STRONG>value</STRONG>.

</P>
<P>
<HR>
<H1><A NAME="NOTES">NOTES</A></H1>
<P>
When one side of an SSL/TLS communication wants to inform the peer about a
special situation, it sends an alert. The alert is sent as a special
message and does not influence the normal data stream (unless its contents
results in the communication being canceled).

</P>
<P>
A warning alert is sent, when a non-fatal error condition occurs. The
``close notify'' alert is sent as a warning alert. Other examples for
non-fatal errors are certificate errors (``certificate expired'',
``unsupported certificate''), for which a warning alert may be sent. (The
sending party may however decide to send a fatal error.) The receiving side
may cancel the connection on reception of a warning alert on it discretion.

</P>
<P>
Several alert messages must be sent as fatal alert messages as specified by
the TLS RFC. A fatal alert always leads to a connection abort.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
The following strings can occur for <CODE>SSL_alert_type_string()</CODE> or
<CODE>SSL_alert_type_string_long():</CODE>

</P>
<DL>
<DT><STRONG><A NAME="item__W_warning_">"W"/"warning"</A></STRONG><DD>
<DT><STRONG><A NAME="item__F_fatal_">"F"/"fatal"</A></STRONG><DD>
<DT><STRONG><A NAME="item__U_unknown_">"U"/"unknown"</A></STRONG><DD>
<P>
This indicates that no support is available for this alert type. Probably <STRONG>value</STRONG> does not contain a correct alert message.

</P>
</DL>
<P>
The following strings can occur for <CODE>SSL_alert_desc_string()</CODE> or
<CODE>SSL_alert_desc_string_long():</CODE>

</P>
<DL>
<DT><STRONG><A NAME="item__CN_close">"CN"/"close notify"</A></STRONG><DD>
<P>
The connection shall be closed. This is a warning alert.

</P>
<DT><STRONG><A NAME="item__UM_unexpected">"UM"/"unexpected message"</A></STRONG><DD>
<P>
An inappropriate message was received. This alert is always fatal and
should never be observed in communication between proper implementations.

</P>
<DT><STRONG><A NAME="item__BM_bad">"BM"/"bad record mac"</A></STRONG><DD>
<P>
This alert is returned if a record is received with an incorrect MAC. This
message is always fatal.

</P>
<DT><STRONG><A NAME="item__DF_decompression">"DF"/"decompression failure"</A></STRONG><DD>
<P>
The decompression function received improper input (e.g. data that would
expand to excessive length). This message is always fatal.

</P>
<DT><STRONG><A NAME="item__HF_handshake">"HF"/"handshake failure"</A></STRONG><DD>
<P>
Reception of a handshake_failure alert message indicates that the sender
was unable to negotiate an acceptable set of security parameters given the
options available. This is a fatal error.

</P>
<DT><STRONG><A NAME="item__NC_no">"NC"/"no certificate"</A></STRONG><DD>
<P>
A client, that was asked to send a certificate, does not send a certificate
(SSLv3 only).

</P>
<DT><STRONG><A NAME="item__BC_bad">"BC"/"bad certificate"</A></STRONG><DD>
<P>
A certificate was corrupt, contained signatures that did not verify
correctly, etc

</P>
<DT><STRONG><A NAME="item__UC_unsupported">"UC"/"unsupported certificate"</A></STRONG><DD>
<P>
A certificate was of an unsupported type.

</P>
<DT><STRONG><A NAME="item__CR_certificate">"CR"/"certificate revoked"</A></STRONG><DD>
<P>
A certificate was revoked by its signer.

</P>
<DT><STRONG><A NAME="item__CE_certificate">"CE"/"certificate expired"</A></STRONG><DD>
<P>
A certificate has expired or is not currently valid.

</P>
<DT><STRONG><A NAME="item__CU_certificate">"CU"/"certificate unknown"</A></STRONG><DD>
<P>
Some other (unspecified) issue arose in processing the certificate,
rendering it unacceptable.

</P>
<DT><STRONG><A NAME="item__IP_illegal">"IP"/"illegal parameter"</A></STRONG><DD>
<P>
A field in the handshake was out of range or inconsistent with other
fields. This is always fatal.

</P>
<DT><STRONG><A NAME="item__DC_decryption">"DC"/"decryption failed"</A></STRONG><DD>
<P>
A TLSCiphertext decrypted in an invalid way: either it wasn't an even
multiple of the block length or its padding values, when checked, weren't
correct. This message is always fatal.

</P>
<DT><STRONG><A NAME="item__RO_record">"RO"/"record overflow"</A></STRONG><DD>
<P>
A TLSCiphertext record was received which had a length more than 2^14+2048
bytes, or a record decrypted to a TLSCompressed record with more than
2^14+1024 bytes. This message is always fatal.

</P>
<DT><STRONG><A NAME="item__CA_unknown">"CA"/"unknown CA"</A></STRONG><DD>
<P>
A valid certificate chain or partial chain was received, but the
certificate was not accepted because the CA certificate could not be
located or couldn't be matched with a known, trusted CA. This message is
always fatal.

</P>
<DT><STRONG><A NAME="item__AD_access">"AD"/"access denied"</A></STRONG><DD>
<P>
A valid certificate was received, but when access control was applied, the
sender decided not to proceed with negotiation. This message is always
fatal.

</P>
<DT><STRONG><A NAME="item__DE_decode">"DE"/"decode error"</A></STRONG><DD>
<P>
A message could not be decoded because some field was out of the specified
range or the length of the message was incorrect. This message is always
fatal.

</P>
<DT><STRONG><A NAME="item__CY_decrypt">"CY"/"decrypt error"</A></STRONG><DD>
<P>
A handshake cryptographic operation failed, including being unable to
correctly verify a signature, decrypt a key exchange, or validate a
finished message.

</P>
<DT><STRONG><A NAME="item__ER_export">"ER"/"export restriction"</A></STRONG><DD>
<P>
A negotiation not in compliance with export restrictions was detected; for
example, attempting to transfer a 1024 bit ephemeral RSA key for the
RSA_EXPORT handshake method. This message is always fatal.

</P>
<DT><STRONG><A NAME="item__PV_protocol">"PV"/"protocol version"</A></STRONG><DD>
<P>
The protocol version the client has attempted to negotiate is recognized,
but not supported. (For example, old protocol versions might be avoided for
security reasons). This message is always fatal.

</P>
<DT><STRONG><A NAME="item__IS_insufficient">"IS"/"insufficient security"</A></STRONG><DD>
<P>
Returned instead of handshake_failure when a negotiation has failed
specifically because the server requires ciphers more secure than those
supported by the client. This message is always fatal.

</P>
<DT><STRONG><A NAME="item__IE_internal">"IE"/"internal error"</A></STRONG><DD>
<P>
An internal error unrelated to the peer or the correctness of the protocol
makes it impossible to continue (such as a memory allocation failure). This
message is always fatal.

</P>
<DT><STRONG><A NAME="item__US_user">"US"/"user canceled"</A></STRONG><DD>
<P>
This handshake is being canceled for some reason unrelated to a protocol
failure. If the user cancels an operation after the handshake is complete,
just closing the connection by sending a close_notify is more appropriate.
This alert should be followed by a close_notify. This message is generally
a warning.

</P>
<DT><STRONG><A NAME="item__NR_no">"NR"/"no renegotiation"</A></STRONG><DD>
<P>
Sent by the client in response to a hello request or by the server in
response to a client hello after initial handshaking. Either of these would
normally lead to renegotiation; when that is not appropriate, the recipient
should respond with this alert; at that point, the original requester can
decide whether to proceed with the connection. One case where this would be
appropriate would be where a server has spawned a process to satisfy a
request; the process might receive security parameters (key length,
authentication, etc.) at startup and it might be difficult to communicate
changes to these parameters after that point. This message is always a
warning.

</P>
<DT><STRONG><A NAME="item__UK_unknown_">"UK"/"unknown"</A></STRONG><DD>
<P>
This indicates that no description is available for this alert type.
Probably <STRONG>value</STRONG> does not contain a correct alert message.

</P>
</DL>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../ssl/ssl.html#">ssl(3)</A>, <A HREF="../ssl/SSL_CTX_set_info_callback.html#">SSL_CTX_set_info_callback(3)</A>



</P>
:}

