add a logging event for dropping 1-RTT keys

This commit is contained in:
Marten Seemann
2020-09-09 14:55:46 +07:00
parent 9e1d65f4c9
commit dbaacd49bd
9 changed files with 77 additions and 1 deletions

View File

@@ -365,6 +365,20 @@ func (t *connectionTracer) DroppedEncryptionLevel(encLevel protocol.EncryptionLe
t.mutex.Unlock()
}
func (t *connectionTracer) DroppedKey(generation protocol.KeyPhase) {
t.mutex.Lock()
now := time.Now()
t.recordEvent(now, &eventKeyRetired{
KeyType: encLevelToKeyType(protocol.Encryption1RTT, protocol.PerspectiveServer),
Generation: generation,
})
t.recordEvent(now, &eventKeyRetired{
KeyType: encLevelToKeyType(protocol.Encryption1RTT, protocol.PerspectiveClient),
Generation: generation,
})
t.mutex.Unlock()
}
func (t *connectionTracer) SetLossTimer(tt logging.TimerType, encLevel protocol.EncryptionLevel, timeout time.Time) {
t.mutex.Lock()
now := time.Now()