Skip to content

feat: ssl context management#1398

Merged
braindigitalis merged 2 commits intodevfrom
ssl_contexts
Mar 6, 2025
Merged

feat: ssl context management#1398
braindigitalis merged 2 commits intodevfrom
ssl_contexts

Conversation

@braindigitalis
Copy link
Contributor

Instead of creating a new ssl context for every connection, we only need:

  • one SSL context for all client connections
  • one for each listening port, with the SSL private key and public key loaded into it

This saves on memory of having to keep copies of the context around, and also massively cuts down on cpu use. Creating an SSL context from scratch means loading the cert store and root certs, generating things, loading private and public keys from disk and more.

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@braindigitalis braindigitalis self-assigned this Mar 4, 2025
@github-actions github-actions bot added documentation Improvements or additions to documentation code Improvements or additions to code. labels Mar 4, 2025
@netlify
Copy link

netlify bot commented Mar 4, 2025

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit d269a5d
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/67c78add9c889200089f0d81
😎 Deploy Preview https://deploy-preview-1398--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@RealTimeChris RealTimeChris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Nicely done.

Copy link
Member

@Neko-Life Neko-Life left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@braindigitalis braindigitalis merged commit 43ee1f0 into dev Mar 6, 2025
116 of 117 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code Improvements or additions to code. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants