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

Load TLS certs only once #330

Merged
merged 1 commit into from
Apr 18, 2021
Merged

Load TLS certs only once #330

merged 1 commit into from
Apr 18, 2021

Conversation

hannesdejager
Copy link
Collaborator

@hannesdejager hannesdejager commented Apr 18, 2021

Currently we setup the TLS server configuration on every connection, loading the certificate and key from its files every time.

Besides that this is wrong in the sense that this won't allow us to do TLS session resumption by way of a shared cache, this is also inefficient and according to rustls docs, constructing the rustls::ServerConfig object is expensive and should be done once per process.

I'm not completely happy with how I changed the FtpsConfig enum but that I can fix in another refactor.

@hannesdejager hannesdejager merged commit 515be66 into master Apr 18, 2021
@hannesdejager hannesdejager deleted the hannes/tls-session branch April 18, 2021 20:46
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 this pull request may close these issues.

2 participants