Skip to content

Commit

Permalink
fix the incorrect way of checking if client has offered PSK for resum…
Browse files Browse the repository at this point in the history
…ption (amends #81)
  • Loading branch information
kazuho committed Nov 12, 2017
1 parent e73a777 commit d73e224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/picotls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d73e224

Please sign in to comment.