summaryrefslogtreecommitdiff
path: root/ssl/s3_msg.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-08-22 16:09:23 +0100
committerMatt Caswell <matt@openssl.org>2022-09-23 14:43:24 +0100
commitb5cf81f7c9775d2502730ba126893ce8af4db90e (patch)
treeae7582599104be7914a79883bc968c832a78a8db /ssl/s3_msg.c
parent310590139e45116d86627dcc85e83f2e3fcbb6b4 (diff)
downloadopenssl-new-b5cf81f7c9775d2502730ba126893ce8af4db90e.tar.gz
Replace references to s->wbio with rl->bio
We use the record layer reference to the BIO rather than the SSL object reference. This removes an unneeded SSL object usage. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19198)
Diffstat (limited to 'ssl/s3_msg.c')
-rw-r--r--ssl/s3_msg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ssl/s3_msg.c b/ssl/s3_msg.c
index 06acc0b466..01ff53bec0 100644
--- a/ssl/s3_msg.c
+++ b/ssl/s3_msg.c
@@ -87,6 +87,11 @@ int ssl3_dispatch_alert(SSL *s)
sc->s3.alert_dispatch = 0;
+ if (sc->rlayer.wrlmethod == NULL) {
+ /* No write record layer so we can't sent and alert. We just ignore it */
+ return 1;
+ }
+
templ.type = SSL3_RT_ALERT;
templ.buf = &sc->s3.send_alert[0];
templ.buflen = 2;