Kaynağa Gözat

tris: restore retry logic on warning alerts

Not sure why the retry logic was removed since 0-RTT works even in
presence of the special alerts handling (alertEndOfEarlyData is
processed before the warning alert). To reduce divergence from upstream
code (which adds a restriction on the number of consecutive warnings),
restore the original retry logic.

Do not do anything fancy here, later drafts will remove the special
alert handling since it becomes a special handshake message.

Fixes: ("crypto/tls: implement TLS 1.3 server 0-RTT")
tls13
Peter Wu 7 yıl önce
ebeveyn
işleme
9e22da5ecc
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. +2
    -1
      conn.go

+ 2
- 1
conn.go Dosyayı Görüntüle

@@ -649,6 +649,7 @@ func (c *Conn) readRecord(want recordType) error {
}
}

Again:
if c.rawInput == nil {
c.rawInput = c.in.newBlock()
}
@@ -776,7 +777,7 @@ func (c *Conn) readRecord(want recordType) error {
case alertLevelWarning:
// drop on the floor
c.in.freeBlock(b)
return nil
goto Again
case alertLevelError:
c.in.setErrorLocked(&net.OpError{Op: "remote error", Err: alert(data[1])})
default:


Yükleniyor…
İptal
Kaydet