Skip to content

Commit

Permalink
Allow SSL negotiation for clients (#10239)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner authored Apr 13, 2024
1 parent c59f493 commit 21ad40e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/bun-usockets/src/crypto/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ struct us_internal_ssl_socket_t *ssl_on_open(struct us_internal_ssl_socket_t *s,

if (is_client) {
SSL_set_connect_state(s->ssl);

// allow clients to renegotiate
// https://github.com/oven-sh/bun/issues/6197
// https://github.com/oven-sh/bun/issues/5363
// this can be a DoS vector for servers, so we do not enable it yet there.
SSL_set_renegotiate_mode(s->ssl, ssl_renegotiate_freely);
} else {
SSL_set_accept_state(s->ssl);
}
Expand Down

0 comments on commit 21ad40e

Please sign in to comment.