marshalWithoutBinders returns the ClientHello through the PreSharedKeyExtension.identities field, according to RFC 8446, Section 4.2.11.2. Note that m.pskBinders must be set to slices of the correct length.
()
| 304 | // PreSharedKeyExtension.identities field, according to RFC 8446, Section |
| 305 | // 4.2.11.2. Note that m.pskBinders must be set to slices of the correct length. |
| 306 | func (m *clientHelloMsg) marshalWithoutBinders() []byte { |
| 307 | bindersLen := 2 // uint16 length prefix |
| 308 | for _, binder := range m.pskBinders { |
| 309 | bindersLen += 1 // uint8 length prefix |
| 310 | bindersLen += len(binder) |
| 311 | } |
| 312 | |
| 313 | fullMessage := m.marshal() |
| 314 | return fullMessage[:len(fullMessage)-bindersLen] |
| 315 | } |
| 316 | |
| 317 | // updateBinders updates the m.pskBinders field, if necessary updating the |
| 318 | // cached marshaled representation. The supplied binders must have the same |
no test coverage detected