Skip to content

Commit

Permalink
Fix server-side KeyUpdates.
Browse files Browse the repository at this point in the history
We sized the post-handshake message limit for the older zero-length
KeyUpdate and forgot to update it when it got larger.

Thanks to Matt Caswell for catching this.

Change-Id: I7d2189479e9516fbfb6c195dfa367794d383582c
Reviewed-on: https://boringssl-review.googlesource.com/13805
Reviewed-by: Steven Valdez <[email protected]>
Reviewed-by: David Benjamin <[email protected]>
Commit-Queue: David Benjamin <[email protected]>
CQ-Verified: CQ bot account: [email protected] <[email protected]>
  • Loading branch information
davidben authored and CQ bot account: [email protected] committed Feb 10, 2017
1 parent bc6ef7a commit 7ebe61a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ssl/s3_both.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ size_t ssl_max_handshake_message_len(const SSL *ssl) {
if (ssl->server) {
/* The largest acceptable post-handshake message for a server is a
* KeyUpdate. We will never initiate post-handshake auth. */
return 0;
return 1;
}

/* Clients must accept NewSessionTicket and CertificateRequest, so allow the
Expand Down
11 changes: 10 additions & 1 deletion ssl/test/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -2290,7 +2290,16 @@ func addBasicTests() {
expectedError: ":WRONG_VERSION_NUMBER:",
},
{
name: "KeyUpdate",
name: "KeyUpdate-Client",
config: Config{
MaxVersion: VersionTLS13,
},
sendKeyUpdates: 1,
keyUpdateRequest: keyUpdateNotRequested,
},
{
testType: serverTest,
name: "KeyUpdate-Server",
config: Config{
MaxVersion: VersionTLS13,
},
Expand Down

0 comments on commit 7ebe61a

Please sign in to comment.