Fix runner.go session ticket support.
Some test code to insert a bogus session ticket was retained. Also, decryptTicket mutated its input, in turn, mutating the ClientHello, breaking the Finished hash. The latter fix should probably be merged upstream. Change-Id: I6949f842c67e19df8742561fb0b849af9f5f099d Reviewed-on: https://boringssl-review.googlesource.com/1290 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
committed by
Adam Langley
parent
42be6456ca
commit
b61b4de6df
@@ -588,10 +588,6 @@ func (hs *serverHandshakeState) sendSessionTicket() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.ticket = make([]byte, 16105+62)
|
||||
for i := range m.ticket {
|
||||
m.ticket[i] = 'A'
|
||||
}
|
||||
|
||||
hs.finishedHash.Write(m.marshal())
|
||||
c.writeRecord(recordTypeHandshake, m.marshal())
|
||||
|
||||
@@ -173,7 +173,7 @@ func (c *Conn) decryptTicket(encrypted []byte) (*sessionState, bool) {
|
||||
return nil, false
|
||||
}
|
||||
ciphertext := encrypted[aes.BlockSize : len(encrypted)-sha256.Size]
|
||||
plaintext := ciphertext
|
||||
plaintext := make([]byte, len(ciphertext))
|
||||
cipher.NewCTR(block, iv).XORKeyStream(plaintext, ciphertext)
|
||||
|
||||
state := new(sessionState)
|
||||
|
||||
Reference in New Issue
Block a user