📄 ssl_alert_type_string.pod
字号:
=pod=head1 NAMESSL_alert_type_string, SSL_alert_type_string_long, SSL_alert_desc_string, SSL_alert_desc_string_long - get textual description of alert information=head1 SYNOPSIS #include <openssl/ssl.h> const char *SSL_alert_type_string(int value); const char *SSL_alert_type_string_long(int value); const char *SSL_alert_desc_string(int value); const char *SSL_alert_desc_string_long(int value);=head1 DESCRIPTIONSSL_alert_type_string() returns a one letter string indicating thetype of the alert specified by B<value>.SSL_alert_type_string_long() returns a string indicating the type of the alertspecified by B<value>.SSL_alert_desc_string() returns a two letter string as a short formdescribing the reason of the alert specified by B<value>.SSL_alert_desc_string_long() returns a string describing the reasonof the alert specified by B<value>.=head1 NOTESWhen one side of an SSL/TLS communication wants to inform the peer abouta special situation, it sends an alert. The alert is sent as a special messageand does not influence the normal data stream (unless its contents resultsin the communication being canceled).A warning alert is sent, when a non-fatal error condition occurs. The"close notify" alert is sent as a warning alert. Other examples fornon-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.) Thereceiving side may cancel the connection on reception of a warningalert on it discretion.Several alert messages must be sent as fatal alert messages as specifiedby the TLS RFC. A fatal alert always leads to a connection abort.=head1 RETURN VALUESThe following strings can occur for SSL_alert_type_string() orSSL_alert_type_string_long():=over 4=item "W"/"warning"=item "F"/"fatal"=item "U"/"unknown"This indicates that no support is available for this alert type.Probably B<value> does not contain a correct alert message.=backThe following strings can occur for SSL_alert_desc_string() orSSL_alert_desc_string_long():=over 4=item "CN"/"close notify"The connection shall be closed. This is a warning alert.=item "UM"/"unexpected message"An inappropriate message was received. This alert is always fataland should never be observed in communication between properimplementations.=item "BM"/"bad record mac"This alert is returned if a record is received with an incorrectMAC. This message is always fatal.=item "DF"/"decompression failure"The decompression function received improper input (e.g. datathat would expand to excessive length). This message is alwaysfatal.=item "HF"/"handshake failure"Reception of a handshake_failure alert message indicates that thesender was unable to negotiate an acceptable set of securityparameters given the options available. This is a fatal error.=item "NC"/"no certificate"A client, that was asked to send a certificate, does not send a certificate(SSLv3 only).=item "BC"/"bad certificate"A certificate was corrupt, contained signatures that did notverify correctly, etc=item "UC"/"unsupported certificate"A certificate was of an unsupported type.=item "CR"/"certificate revoked"A certificate was revoked by its signer.=item "CE"/"certificate expired"A certificate has expired or is not currently valid.=item "CU"/"certificate unknown"Some other (unspecified) issue arose in processing thecertificate, rendering it unacceptable.=item "IP"/"illegal parameter"A field in the handshake was out of range or inconsistent withother fields. This is always fatal.=item "DC"/"decryption failed"A TLSCiphertext decrypted in an invalid way: either it wasn't aneven multiple of the block length or its padding values, whenchecked, weren't correct. This message is always fatal.=item "RO"/"record overflow"A TLSCiphertext record was received which had a length more than2^14+2048 bytes, or a record decrypted to a TLSCompressed recordwith more than 2^14+1024 bytes. This message is always fatal.=item "CA"/"unknown CA"A valid certificate chain or partial chain was received, but thecertificate was not accepted because the CA certificate could notbe located or couldn't be matched with a known, trusted CA. Thismessage is always fatal.=item "AD"/"access denied"A valid certificate was received, but when access control wasapplied, the sender decided not to proceed with negotiation.This message is always fatal.=item "DE"/"decode error"A message could not be decoded because some field was out of thespecified range or the length of the message was incorrect. Thismessage is always fatal.=item "CY"/"decrypt error"A handshake cryptographic operation failed, including beingunable to correctly verify a signature, decrypt a key exchange,or validate a finished message.=item "ER"/"export restriction"A negotiation not in compliance with export restrictions wasdetected; for example, attempting to transfer a 1024 bitephemeral RSA key for the RSA_EXPORT handshake method. Thismessage is always fatal.=item "PV"/"protocol version"The protocol version the client has attempted to negotiate isrecognized, but not supported. (For example, old protocolversions might be avoided for security reasons). This message isalways fatal.=item "IS"/"insufficient security"Returned instead of handshake_failure when a negotiation hasfailed specifically because the server requires ciphers moresecure than those supported by the client. This message is alwaysfatal.=item "IE"/"internal error"An internal error unrelated to the peer or the correctness of theprotocol makes it impossible to continue (such as a memoryallocation failure). This message is always fatal.=item "US"/"user canceled"This handshake is being canceled for some reason unrelated to aprotocol failure. If the user cancels an operation after thehandshake is complete, just closing the connection by sending aclose_notify is more appropriate. This alert should be followedby a close_notify. This message is generally a warning.=item "NR"/"no renegotiation"Sent by the client in response to a hello request or by theserver in response to a client hello after initial handshaking.Either of these would normally lead to renegotiation; when thatis not appropriate, the recipient should respond with this alert;at that point, the original requester can decide whether toproceed with the connection. One case where this would beappropriate would be where a server has spawned a process tosatisfy a request; the process might receive security parameters(key length, authentication, etc.) at startup and it might bedifficult to communicate changes to these parameters after thatpoint. This message is always a warning.=item "UK"/"unknown"This indicates that no description is available for this alert type.Probably B<value> does not contain a correct alert message.=back=head1 SEE ALSOL<ssl(3)|ssl(3)>, L<SSL_CTX_set_info_callback(3)|SSL_CTX_set_info_callback(3)>=cut
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -