summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2019-02-28 17:51:20 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2019-02-28 17:51:20 +0000
commit4b9ccbd8e580f0be83250b11b99a830cc10872ab (patch)
treeb31ef63db028344e8fe8ae76a6b6a4a0f2d340ca /lib
parent6b276cacc3460c838d82b296a8cae28fe016bf1e (diff)
Set the SSL state as part of tls13_legacy_connect().
Set the SSL state to SSL_ST_CONNECT during the TLSv1.3 handshake and to SSL_ST_OK once the handshake completes, since some applications currently rely on this information to function correctly. ok inoguchi@ tb@
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/tls13_client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libssl/tls13_client.c b/lib/libssl/tls13_client.c
index 728d1a00c86..56faf3f5d45 100644
--- a/lib/libssl/tls13_client.c
+++ b/lib/libssl/tls13_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_client.c,v 1.12 2019/02/25 16:46:17 jsing Exp $ */
+/* $OpenBSD: tls13_client.c,v 1.13 2019/02/28 17:51:19 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
@@ -79,7 +79,10 @@ tls13_legacy_connect(SSL *ssl)
}
}
- ret = tls13_connect(ctx);
+ S3I(ssl)->hs.state = SSL_ST_CONNECT;
+
+ if ((ret = tls13_connect(ctx)) == TLS13_IO_SUCCESS)
+ S3I(ssl)->hs.state = SSL_ST_OK;
return tls13_legacy_return_code(ssl, ret);
}