s3_msg.c (17f01e9963948a18f55eb97173123702c5dae671) s3_msg.c (9a3ae0cdef9ac9a4b8c5cc66305d9a516ce8d4a0)
1/*
1/*
2 * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#include "ssl_local.h"

--- 32 unchanged lines hidden (view full) ---

43 desc = tls13_alert_code(desc);
44 else
45 desc = s->method->ssl3_enc->alert_value(desc);
46 if (s->version == SSL3_VERSION && desc == SSL_AD_PROTOCOL_VERSION)
47 desc = SSL_AD_HANDSHAKE_FAILURE; /* SSL 3.0 does not have
48 * protocol_version alerts */
49 if (desc < 0)
50 return -1;
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#include "ssl_local.h"

--- 32 unchanged lines hidden (view full) ---

43 desc = tls13_alert_code(desc);
44 else
45 desc = s->method->ssl3_enc->alert_value(desc);
46 if (s->version == SSL3_VERSION && desc == SSL_AD_PROTOCOL_VERSION)
47 desc = SSL_AD_HANDSHAKE_FAILURE; /* SSL 3.0 does not have
48 * protocol_version alerts */
49 if (desc < 0)
50 return -1;
51 if (s->shutdown & SSL_SENT_SHUTDOWN && desc != SSL_AD_CLOSE_NOTIFY)
52 return -1;
51 /* If a fatal one, remove from cache */
52 if ((level == SSL3_AL_FATAL) && (s->session != NULL))
53 SSL_CTX_remove_session(s->session_ctx, s->session);
54
55 s->s3->alert_dispatch = 1;
56 s->s3->send_alert[0] = level;
57 s->s3->send_alert[1] = desc;
58 if (!RECORD_LAYER_write_pending(&s->rlayer)) {

--- 46 unchanged lines hidden ---
53 /* If a fatal one, remove from cache */
54 if ((level == SSL3_AL_FATAL) && (s->session != NULL))
55 SSL_CTX_remove_session(s->session_ctx, s->session);
56
57 s->s3->alert_dispatch = 1;
58 s->s3->send_alert[0] = level;
59 s->s3->send_alert[1] = desc;
60 if (!RECORD_LAYER_write_pending(&s->rlayer)) {

--- 46 unchanged lines hidden ---