From d73e22404ad7b7036debf563de4e56115ee97d8f Mon Sep 17 00:00:00 2001 From: Kazuho Oku Date: Sun, 12 Nov 2017 11:48:30 +0800 Subject: [PATCH] fix the incorrect way of checking if client has offered PSK for resumption (amends #81) --- lib/picotls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/picotls.c b/lib/picotls.c index 7b5a14645..bc7f22976 100644 --- a/lib/picotls.c +++ b/lib/picotls.c @@ -2356,7 +2356,7 @@ static int server_handle_hello(ptls_t *tls, ptls_buffer_t *sendbuf, ptls_iovec_t sendbuf->off = hrr_start; is_second_flight = 1; - } else if ((key_share.algorithm == NULL && ch.psk.ke_modes == 0) || enforce_cookie_use) { + } else if ((key_share.algorithm == NULL && ch.psk.identities.count == 0) || enforce_cookie_use) { /* send HelloRetryRequest */ if (ch.negotiated_groups.base == NULL) {