diff options
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 504044d8af..11735f0d2c 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.97 2021/06/11 11:13:53 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.98 2021/06/15 19:09:03 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -1160,19 +1160,12 @@ dtls1_dispatch_alert(SSL *s) | |||
1160 | { | 1160 | { |
1161 | int i, j; | 1161 | int i, j; |
1162 | void (*cb)(const SSL *ssl, int type, int val) = NULL; | 1162 | void (*cb)(const SSL *ssl, int type, int val) = NULL; |
1163 | unsigned char buf[DTLS1_AL_HEADER_LENGTH]; | ||
1164 | unsigned char *ptr = &buf[0]; | ||
1165 | 1163 | ||
1166 | S3I(s)->alert_dispatch = 0; | 1164 | S3I(s)->alert_dispatch = 0; |
1167 | 1165 | ||
1168 | memset(buf, 0, sizeof(buf)); | 1166 | i = do_dtls1_write(s, SSL3_RT_ALERT, &S3I(s)->send_alert[0], 2); |
1169 | *ptr++ = S3I(s)->send_alert[0]; | ||
1170 | *ptr++ = S3I(s)->send_alert[1]; | ||
1171 | |||
1172 | i = do_dtls1_write(s, SSL3_RT_ALERT, &buf[0], sizeof(buf)); | ||
1173 | if (i <= 0) { | 1167 | if (i <= 0) { |
1174 | S3I(s)->alert_dispatch = 1; | 1168 | S3I(s)->alert_dispatch = 1; |
1175 | /* fprintf( stderr, "not done with alert\n" ); */ | ||
1176 | } else { | 1169 | } else { |
1177 | if (S3I(s)->send_alert[0] == SSL3_AL_FATAL) | 1170 | if (S3I(s)->send_alert[0] == SSL3_AL_FATAL) |
1178 | (void)BIO_flush(s->wbio); | 1171 | (void)BIO_flush(s->wbio); |