diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-06-28 15:36:52 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-06-28 15:36:52 +0000 |
commit | dee28d979e7030f9b5250979b505d2d0d4257d2e (patch) | |
tree | 0a39d611b7e3a991888e3c79b7cc8bf5a1f8d72d /lib | |
parent | e2a251a37e471b3c92d146692c8960cc0a9d5424 (diff) |
The state machine now takes care of setting the legacy state,
so it is no longer necessary in to do this by hand in various
places of the code interfacing with the legacy stack.
ok jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/tls13_legacy.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/libssl/tls13_legacy.c b/lib/libssl/tls13_legacy.c index f71bac48cde..cd9ec9942d0 100644 --- a/lib/libssl/tls13_legacy.c +++ b/lib/libssl/tls13_legacy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_legacy.c,v 1.24 2021/04/19 16:51:56 jsing Exp $ */ +/* $OpenBSD: tls13_legacy.c,v 1.25 2021/06/28 15:36:51 tb Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> * @@ -361,8 +361,6 @@ tls13_use_legacy_client(struct tls13_ctx *ctx) s->internal->handshake_func = s->method->internal->ssl_connect; s->client_version = s->version = s->method->internal->max_tls_version; - ctx->hs->state = SSL3_ST_CR_SRVR_HELLO_A; - return 1; } @@ -378,8 +376,6 @@ tls13_use_legacy_server(struct tls13_ctx *ctx) s->client_version = s->version = s->method->internal->max_tls_version; s->server = 1; - ctx->hs->state = SSL3_ST_SR_CLNT_HELLO_A; - return 1; } @@ -406,13 +402,10 @@ tls13_legacy_accept(SSL *ssl) } ERR_clear_error(); - ctx->hs->state = SSL_ST_ACCEPT; ret = tls13_server_accept(ctx); if (ret == TLS13_IO_USE_LEGACY) return ssl->method->internal->ssl_accept(ssl); - if (ret == TLS13_IO_SUCCESS) - ctx->hs->state = SSL_ST_OK; return tls13_legacy_return_code(ssl, ret); } @@ -448,13 +441,10 @@ tls13_legacy_connect(SSL *ssl) } ERR_clear_error(); - ctx->hs->state = SSL_ST_CONNECT; ret = tls13_client_connect(ctx); if (ret == TLS13_IO_USE_LEGACY) return ssl->method->internal->ssl_connect(ssl); - if (ret == TLS13_IO_SUCCESS) - ctx->hs->state = SSL_ST_OK; return tls13_legacy_return_code(ssl, ret); } |