Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify lifetime of TLS stack dependencies #3321

Closed
Tracked by #3209
reneme opened this issue Feb 24, 2023 · 0 comments · Fixed by #3409
Closed
Tracked by #3209

Clarify lifetime of TLS stack dependencies #3321

reneme opened this issue Feb 24, 2023 · 0 comments · Fixed by #3409
Milestone

Comments

@reneme
Copy link
Collaborator

reneme commented Feb 24, 2023

Currently, TLS::Client and TLS::Server take a number of dependency objects by reference in their constructors. The application is responsible for keeping those objects alive as long as the TLS stack is alive.
Some or all of those dependencies might be shared with multiple instances of the TLS stack.

This is a follow-up to a discussion in the Session_Manager restructuring PR.

The "dependency objects" in question are:

  • TLS::Callbacks
  • TLS::Session_Manager
  • TLS::Policy
  • Credentials_Manager
  • RandomNumberGenerator

To me, the most obvious change would be to replace the references by std::shared_ptr<>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant