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

move MaxTokenAge configuration option to the Transport #4084

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

marten-seemann
Copy link
Member

@marten-seemann marten-seemann commented Sep 14, 2023

Even more API cleanup. Trying to do all the token-related API changes in one release, to reduce the amount of pain caused for users.

Depends on #4066.

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Merging #4084 (a92662e) into master (ab1c1be) will decrease coverage by 0.02%.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4084      +/-   ##
==========================================
- Coverage   83.59%   83.57%   -0.02%     
==========================================
  Files         148      148              
  Lines       15227    15225       -2     
==========================================
- Hits        12728    12723       -5     
- Misses       1999     2001       +2     
- Partials      500      501       +1     
Files Changed Coverage Δ
config.go 100.00% <ø> (ø)
interface.go 0.00% <ø> (ø)
internal/handshake/token_protector.go 48.78% <100.00%> (ø)
server.go 76.33% <100.00%> (+0.04%) ⬆️
transport.go 72.44% <100.00%> (+0.09%) ⬆️

... and 1 file with indirect coverage changes

@@ -68,7 +61,7 @@ func (s *tokenProtectorImpl) DecodeToken(p []byte) ([]byte, error) {
}

func (s *tokenProtectorImpl) createAEAD(nonce []byte) (cipher.AEAD, []byte, error) {
h := hkdf.New(sha256.New, s.secret, nonce, []byte("quic-go token source"))
h := hkdf.New(sha256.New, s.key[:], nonce[:], []byte("quic-go token source"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: nonce instead of nonce[:]

@marten-seemann marten-seemann changed the base branch from configure-token-key to master September 16, 2023 11:56
@marten-seemann marten-seemann merged commit 1affe38 into master Sep 16, 2023
32 checks passed
@marten-seemann marten-seemann deleted the configure-max-token-age branch September 25, 2023 11:24
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.

None yet

2 participants