diff options
author | jsing <> | 2019-04-04 16:53:57 +0000 |
---|---|---|
committer | jsing <> | 2019-04-04 16:53:57 +0000 |
commit | d61ab6dc79dc9489283d02320a56b12002dce985 (patch) | |
tree | b5bc127ec451e17e440fdd24c01d7da7109c87fc /src/lib/libssl/tls13_handshake.c | |
parent | 4ee3e34310a4dd1cee5a12b0e0b222cbea806322 (diff) | |
download | openbsd-d61ab6dc79dc9489283d02320a56b12002dce985.tar.gz openbsd-d61ab6dc79dc9489283d02320a56b12002dce985.tar.bz2 openbsd-d61ab6dc79dc9489283d02320a56b12002dce985.zip |
Implement legacy fallback for the TLS 1.3 client.
If the Server Hello received indicates that the server did not negotiate
TLS 1.3, fallback to the original TLS client implementation.
ok bcook@, tb@
Diffstat (limited to 'src/lib/libssl/tls13_handshake.c')
-rw-r--r-- | src/lib/libssl/tls13_handshake.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c index a55c20525a..cb39974da5 100644 --- a/src/lib/libssl/tls13_handshake.c +++ b/src/lib/libssl/tls13_handshake.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_handshake.c,v 1.32 2019/03/17 15:48:02 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_handshake.c,v 1.33 2019/04/04 16:53:57 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> |
4 | * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> |
@@ -389,6 +389,9 @@ tls13_handshake_recv_action(struct tls13_ctx *ctx, | |||
389 | tls13_handshake_msg_free(ctx->hs_msg); | 389 | tls13_handshake_msg_free(ctx->hs_msg); |
390 | ctx->hs_msg = NULL; | 390 | ctx->hs_msg = NULL; |
391 | 391 | ||
392 | if (ctx->ssl->method->internal->version < TLS1_3_VERSION) | ||
393 | return TLS13_IO_USE_LEGACY; | ||
394 | |||
392 | return ret; | 395 | return ret; |
393 | } | 396 | } |
394 | 397 | ||