-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
TLS session ticket caching reworked #15774
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
bagder
reviewed
Dec 19, 2024
Described in detail in internal doc TLS-SESSIONS.md Main points: - use a new `ssl_peer_key` for cache lookups by connection filters - recognize differences between TLSv1.3 and other tickets * TLSv1.3 tickets are single-use, cache can hold several of them for a peer * TLSv1.2 are reused, keep only a single one per peer - differentiate between ticket BLOB to store (that could be persisted) and object instances - use put/take/return pattern for cache access - remember TLS version, ALPN protocol, time received and lifetime of ticket - auto-expire tickets after their lifetime
… with how dynbufs work.
bagder
reviewed
Dec 20, 2024
bagder
approved these changes
Dec 20, 2024
vszakats
added a commit
that referenced
this pull request
Feb 26, 2025
…allouts - GHA/windows/WinCE: - set `-O3 -DNDEBUG` C flags manually for the CMake mingw32ce build. CMake doesn't recognize the platform and fails to add them. To match autotools (using `-O2`), and hit similar compiler warnings. - enable parallel builds for cmake. - tune parallelism for cmake using unity batches. - tune parallelism for autotools. Follow-up to 2a292c3 #15975 - tests: fix potentially uninitialized value in `readline()` in `getpart.c`. Detected by gcc 4.4.0 `-O2` (Windows CE) jobs: ``` tests/server/getpart.c: In function 'getpart': tests/server/getpart.c:298: error: 'datalen' may be used uninitialized in this function ``` Ref: https://github.com/curl/curl/actions/runs/13522595237/job/37785147505?pr=16476#step:11:25 Follow-up to 592880a - vtls_scache: rework returning pointer to avoid compiler warning seen with `-O3` gcc 4.4.0 builds (Windows CE/schannel): ``` lib/vtls/schannel.c: In function 'schannel_connect_step1': lib/vtls/vtls_scache.c:975: error: dereferencing pointer 'old_cred.4474' does break strict-aliasing rules lib/vtls/vtls_scache.c:985: error: dereferencing pointer 'old_cred.4474' does break strict-aliasing rules lib/vtls/schannel.c:959: note: initialized from here ``` Ref: https://github.com/curl/curl/actions/runs/13523868335/job/37789610845#step:9:25 Follow-up to fa0ccd9 #15774 Closes #16476
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Described in detail in internal doc TLS-SESSIONS.md Main points: - use a new `ssl_peer_key` for cache lookups by connection filters - recognize differences between TLSv1.3 and other tickets * TLSv1.3 tickets are single-use, cache can hold several of them for a peer * TLSv1.2 are reused, keep only a single one per peer - differentiate between ticket BLOB to store (that could be persisted) and object instances - use put/take/return pattern for cache access - remember TLS version, ALPN protocol, time received and lifetime of ticket - auto-expire tickets after their lifetime Closes curl#15774
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
…allouts - GHA/windows/WinCE: - set `-O3 -DNDEBUG` C flags manually for the CMake mingw32ce build. CMake doesn't recognize the platform and fails to add them. To match autotools (using `-O2`), and hit similar compiler warnings. - enable parallel builds for cmake. - tune parallelism for cmake using unity batches. - tune parallelism for autotools. Follow-up to 2a292c3 curl#15975 - tests: fix potentially uninitialized value in `readline()` in `getpart.c`. Detected by gcc 4.4.0 `-O2` (Windows CE) jobs: ``` tests/server/getpart.c: In function 'getpart': tests/server/getpart.c:298: error: 'datalen' may be used uninitialized in this function ``` Ref: https://github.com/curl/curl/actions/runs/13522595237/job/37785147505?pr=16476#step:11:25 Follow-up to 592880a - vtls_scache: rework returning pointer to avoid compiler warning seen with `-O3` gcc 4.4.0 builds (Windows CE/schannel): ``` lib/vtls/schannel.c: In function 'schannel_connect_step1': lib/vtls/vtls_scache.c:975: error: dereferencing pointer 'old_cred.4474' does break strict-aliasing rules lib/vtls/vtls_scache.c:985: error: dereferencing pointer 'old_cred.4474' does break strict-aliasing rules lib/vtls/schannel.c:959: note: initialized from here ``` Ref: https://github.com/curl/curl/actions/runs/13523868335/job/37789610845#step:9:25 Follow-up to fa0ccd9 curl#15774 Closes curl#16476
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Described in detail in internal doc TLS-SESSIONS.md
Main points:
ssl_peer_key
for cache lookups by connection filters