Try to be more consistent about the alerts we send
authorMatt Caswell <matt@openssl.org>
Tue, 16 May 2017 16:28:23 +0000 (17:28 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 19 May 2017 07:47:08 +0000 (08:47 +0100)
commitfb34a0f4e033246ef5f957bc57d2ebc904a519fc
tree1db7d3e04ad02459db6fb04dd264cf7936dc34e4
parentd8028b202bfe337200a0cc89b80983ea1838cb30
Try to be more consistent about the alerts we send

We are quite inconsistent about which alerts get sent. Specifically, these
alerts should be used (normally) in the following circumstances:

SSL_AD_DECODE_ERROR = The peer sent a syntactically incorrect message
SSL_AD_ILLEGAL_PARAMETER = The peer sent a message which was syntactically
correct, but a parameter given is invalid for the context
SSL_AD_HANDSHAKE_FAILURE = The peer's messages were syntactically and
semantically correct, but the parameters provided were unacceptable to us
(e.g. because we do not support the requested parameters)
SSL_AD_INTERNAL_ERROR = We messed up (e.g. malloc failure)

The standards themselves aren't always consistent but I think the above
represents the best interpretation.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3480)
12 files changed:
ssl/record/ssl3_record.c
ssl/ssl_lib.c
ssl/ssl_rsa.c
ssl/ssl_sess.c
ssl/statem/extensions.c
ssl/statem/extensions_clnt.c
ssl/statem/extensions_srvr.c
ssl/statem/statem_clnt.c
ssl/statem/statem_dtls.c
ssl/statem/statem_lib.c
ssl/statem/statem_srvr.c
ssl/t1_lib.c