-/* $OpenBSD: d1_pkt.c,v 1.104 2021/07/26 03:17:38 jsing Exp $ */
+/* $OpenBSD: d1_pkt.c,v 1.105 2021/07/31 09:31:04 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
cb(s, SSL_CB_READ_ALERT, j);
}
- if (alert_level == 1) /* warning */
- {
+ if (alert_level == SSL3_AL_WARNING) {
S3I(s)->warn_alert = alert_descr;
if (alert_descr == SSL_AD_CLOSE_NOTIFY) {
s->internal->shutdown |= SSL_RECEIVED_SHUTDOWN;
return (0);
}
- } else if (alert_level == 2) /* fatal */
- {
+ } else if (alert_level == SSL3_AL_FATAL) {
s->internal->rwstate = SSL_NOTHING;
S3I(s)->fatal_alert = alert_descr;
SSLerror(s, SSL_AD_REASON_OFFSET + alert_descr);
-/* $OpenBSD: ssl_pkt.c,v 1.46 2021/07/26 03:17:38 jsing Exp $ */
+/* $OpenBSD: ssl_pkt.c,v 1.47 2021/07/31 09:31:04 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
ssl3_send_alert(SSL *s, int level, int desc)
{
/* If a fatal one, remove from cache */
- if ((level == 2) && (s->session != NULL))
+ if ((level == SSL3_AL_FATAL) && (s->session != NULL))
SSL_CTX_remove_session(s->ctx, s->session);
S3I(s)->alert_dispatch = 1;