diff options
author | 2019-02-28 17:51:19 +0000 | |
---|---|---|
committer | 2019-02-28 17:51:19 +0000 | |
commit | 56456dd7855c0c63546f63b9f0d9f4f93cf32ec4 (patch) | |
tree | 4b57e5906494c855dd59ddc5e2d9352624921d7c /lib/libssl/tls13_client.c | |
parent | Add appropriate length checks to tls13_legacy_{read,write}_bytes() (diff) | |
download | wireguard-openbsd-56456dd7855c0c63546f63b9f0d9f4f93cf32ec4.tar.xz wireguard-openbsd-56456dd7855c0c63546f63b9f0d9f4f93cf32ec4.zip |
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/libssl/tls13_client.c')
-rw-r--r-- | lib/libssl/tls13_client.c | 7 |
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); } |