openssl/ssl
Matt Caswell 1f359471f9 Provide an SSLfatal() macro
Typically if a fatal error occurs three things need to happen:

- Put an error on the error queue
- Send an alert
- Put the state machine into the error state

Although all 3 of these things need to be done every time we hit a fatal
error the responsibilities for doing this are distributed throughout the
code. The place where the error goes on the queue, where the alert gets
sent and where the state machine goes into the error state are almost
invariably different. It has been a common pattern to pass alert codes up
and down the stack to get the alert information from the point in the code
where the error is detected to the point in the code where the alert gets
sent.

This commit provides an SSLfatal() macro (backed by an ossl_statem_fatal
function) that does all 3 of the above error tasks. This is largely a drop
in replacement for SSLerr, but takes a couple of extra parameters (the SSL
object, and an alert code).

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4778)
2017-12-04 13:31:48 +00:00
..
record Resolve warnings in VC-WIN32 build, which allows to add /WX. 2017-11-13 10:58:57 +01:00
statem Provide an SSLfatal() macro 2017-12-04 13:31:48 +00:00
bio_ssl.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
build.info Move ssl/t1_ext.c to ssl/statem/extensions_cust.c 2017-04-07 13:41:04 +01:00
d1_lib.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
d1_msg.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
d1_srtp.c
methods.c Drop support for OPENSSL_NO_TLS1_3_METHOD 2017-06-30 09:41:46 +01:00
packet_locl.h TLS1.3 Padding 2017-05-02 09:44:43 +01:00
packet.c Move ossl_assert 2017-08-03 10:48:00 +01:00
pqueue.c Update copyright header 2017-07-30 17:42:00 -04:00
s3_cbc.c Move ossl_assert 2017-08-03 10:48:00 +01:00
s3_enc.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
s3_lib.c Add sk_new_reserve support 2017-11-30 07:13:09 +10:00
s3_msg.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
ssl_asn1.c ssl/ssl_asn1.c: resolve warnings in VC-WIN32 build, which allows to add /WX. 2017-11-13 10:58:21 +01:00
ssl_cert_table.h Add RSA-PSS key certificate type. 2017-09-20 12:50:23 +01:00
ssl_cert.c Simplify the stack reservation 2017-10-26 14:34:35 -04:00
ssl_ciph.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
ssl_conf.c Use ChaCha only if prioritized by clnt 2017-11-30 07:13:08 +10:00
ssl_err.c Implement Maximum Fragment Length TLS extension. 2017-11-05 17:46:48 +01:00
ssl_init.c Implement Aria GCM/CCM Modes and TLS cipher suites 2017-08-30 12:33:53 +02:00
ssl_lib.c Implement Maximum Fragment Length TLS extension. 2017-11-05 17:46:48 +01:00
ssl_locl.h Many spelling fixes/typo's corrected. 2017-11-11 19:03:10 -05:00
ssl_mcnf.c
ssl_rsa.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
ssl_sess.c Use atomics for SSL_CTX statistics 2017-10-30 10:18:09 -05:00
ssl_stat.c Fix SSL_state_string() and SSL_state_string_long() 2017-11-28 10:24:23 +00:00
ssl_txt.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
ssl_utst.c
t1_enc.c style : fix some if(... 2017-11-07 17:09:24 +01:00
t1_lib.c Resolve warnings in VC-WIN32 build, which allows to add /WX. 2017-11-13 10:58:57 +01:00
t1_trce.c SSL Trace improvements 2017-09-10 23:33:37 -04:00
tls13_enc.c Make sure we use the correct cipher when using the early_secret 2017-08-31 15:02:58 +01:00
tls_srp.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00