summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2020-05-23 11:58:47 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2020-05-23 11:58:47 +0000
commit7021a67826f1886f6384ee99d541aab32377122b (patch)
tree68f311f281f1676bff80a260724f541d04f5ce51 /lib
parent27e6227e1d3f5fb88c963dd5bd04d8afca9720f7 (diff)
Wire up SSL_MODE_AUTO_RETRY mode to retrying after PHH messages.
ok beck@ inoguchi@ tb@
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/tls13_client.c5
-rw-r--r--lib/libssl/tls13_server.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/libssl/tls13_client.c b/lib/libssl/tls13_client.c
index cef49c496e9..d7a912a7e16 100644
--- a/lib/libssl/tls13_client.c
+++ b/lib/libssl/tls13_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_client.c,v 1.63 2020/05/19 16:35:21 jsing Exp $ */
+/* $OpenBSD: tls13_client.c,v 1.64 2020/05/23 11:58:46 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
@@ -38,6 +38,9 @@ tls13_client_init(struct tls13_ctx *ctx)
}
s->client_version = s->version = ctx->hs->max_version;
+ tls13_record_layer_set_retry_after_phh(ctx->rl,
+ (s->internal->mode & SSL_MODE_AUTO_RETRY) != 0);
+
if (!ssl_get_new_session(s, 0)) /* XXX */
return 0;
diff --git a/lib/libssl/tls13_server.c b/lib/libssl/tls13_server.c
index e605ccd90fb..621e51d5011 100644
--- a/lib/libssl/tls13_server.c
+++ b/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_server.c,v 1.52 2020/05/23 08:47:19 tb Exp $ */
+/* $OpenBSD: tls13_server.c,v 1.53 2020/05/23 11:58:46 jsing Exp $ */
/*
* Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -34,6 +34,9 @@ tls13_server_init(struct tls13_ctx *ctx)
}
s->version = ctx->hs->max_version;
+ tls13_record_layer_set_retry_after_phh(ctx->rl,
+ (s->internal->mode & SSL_MODE_AUTO_RETRY) != 0);
+
if (!ssl_get_new_session(s, 0)) /* XXX */
return 0;