Skip to content

Commit

Permalink
Merge branch 'key-update-support' into post-handshake-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
tomato42 committed May 24, 2019
2 parents 1992ced + 22ae125 commit 68ecf24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tlslite/tlsrecordlayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,15 @@ def send_keyupdate_request(self, message_type):
if self.closed:
raise TLSClosedConnectionError(
"attempt to write to closed connection")
if self.version != (3, 4):
raise TLSIllegalParameterException("KeyUpdate is a TLS 1.3 specific"
" feature")

keyupdate_request = KeyUpdate().create(message_type)
for result in self._sendMsg(keyupdate_request):
yield result
self.session.cl_app_secret, self.session.sr_app_secret = \
self._recordLayer.calcTLS1_3KeyUpdate_reciever(
self.session.cipherSuite,
self.session.cl_app_secret,
self.session.sr_app_secret)

0 comments on commit 68ecf24

Please sign in to comment.