(data []byte)
| 51 | } |
| 52 | |
| 53 | func (m *sessionState) unmarshal(data []byte) bool { |
| 54 | *m = sessionState{usedOldKey: m.usedOldKey} |
| 55 | s := cryptobyte.String(data) |
| 56 | if ok := s.ReadUint16(&m.vers) && |
| 57 | s.ReadUint16(&m.cipherSuite) && |
| 58 | readUint64(&s, &m.createdAt) && |
| 59 | readUint16LengthPrefixed(&s, &m.masterSecret) && |
| 60 | len(m.masterSecret) != 0; !ok { |
| 61 | return false |
| 62 | } |
| 63 | var certList cryptobyte.String |
| 64 | if !s.ReadUint24LengthPrefixed(&certList) { |
| 65 | return false |
| 66 | } |
| 67 | for !certList.Empty() { |
| 68 | var cert []byte |
| 69 | if !readUint24LengthPrefixed(&certList, &cert) { |
| 70 | return false |
| 71 | } |
| 72 | m.certificates = append(m.certificates, cert) |
| 73 | } |
| 74 | return s.Empty() |
| 75 | } |
| 76 | |
| 77 | // sessionStateTLS13 is the content of a TLS 1.3 session ticket. Its first |
| 78 | // version (revision = 0) doesn't carry any of the information needed for 0-RTT |
nothing calls this directly
no test coverage detected