You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The config pointer in s2n_connection struct might be invalid during connection reuse. The s2n_config struct could be released at sometime before the s2n_connection struct is reused, which makes the pointer pointing to an invalid address, when the connection is actually reused.
Solution:
Create a new API which reset the config pointer in s2n_connection to the default config that the user is using. This can also simplify the management of s2n_connection without requiring deep understanding of how s2n_config is stored in s2n_connection.
Requirements / Acceptance Criteria:
After we wipe a s2n_connection struct and make it ready for connection reuse, we should test whether the config pointer is pointing to the default config.
The text was updated successfully, but these errors were encountered:
Personal Opinion: I don't like concept of a default config, and I'd vote against embracing it more strongly. Since people currently can't rely on this behavior, I'd vote for going towards the other end of the spectrum and instead adding an API to null out the config.
Nulling out the config would work in theory, but would be scary due to the number of places we rely on there being a non-null config without checking it first.
Another similar option: we make s2n_connection_set_config(NULL) set a poison config that behaves as though you set a null config, but isn't actually null.
Problem:
The
config
pointer ins2n_connection
struct might be invalid during connection reuse. Thes2n_config
struct could be released at sometime before thes2n_connection
struct is reused, which makes the pointer pointing to an invalid address, when the connection is actually reused.Solution:
Create a new API which reset the
config
pointer ins2n_connection
to the default config that the user is using. This can also simplify the management ofs2n_connection
without requiring deep understanding of hows2n_config
is stored ins2n_connection
.Requirements / Acceptance Criteria:
After we wipe a
s2n_connection
struct and make it ready for connection reuse, we should test whether theconfig
pointer is pointing to the default config.The text was updated successfully, but these errors were encountered: