openssl: SSL_clear do not reset the state of the QUIC members

Hello,

It looks like SSL_clear doesn’t reset any QUIC-specific members (like the quic_read_level / quic_write_level). This means that it is currently impossible to re-use the same SSL object to re-establish another connection.

I guess we should reset the following members:

  • quic_read_level to ssl_encryption_inititial
  • quic_write_level to ssl_encryption_inititial
  • quic_latest_level_received to ssl_encryption_inititial
  • quic_buf to an empty buffer
  • quic_input_data_head to NULL
  • quic_input_data_tail to NULL
  • quic_next_record_start to 0

Am I missing anything?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@tmshort Tested your changes with 1.1.1 and I could remove the SSL_do_handshake that we had to add. The clear also does work as expected.

I’m working on this, but it’s non-trivial, as SSL_clear() is called in unexpected places…