sendDummyChangeCipherSpec sends a ChangeCipherSpec record for compatibility with middleboxes that didn't implement TLS correctly. See RFC 8446, Appendix D.4.
()
| 163 | // sendDummyChangeCipherSpec sends a ChangeCipherSpec record for compatibility |
| 164 | // with middleboxes that didn't implement TLS correctly. See RFC 8446, Appendix D.4. |
| 165 | func (hs *clientHandshakeStateTLS13) sendDummyChangeCipherSpec() error { |
| 166 | if hs.sentDummyCCS { |
| 167 | return nil |
| 168 | } |
| 169 | hs.sentDummyCCS = true |
| 170 | |
| 171 | _, err := hs.c.writeRecord(recordTypeChangeCipherSpec, []byte{1}) |
| 172 | return err |
| 173 | } |
| 174 | |
| 175 | // processHelloRetryRequest handles the HRR in hs.serverHello, modifies and |
| 176 | // resends hs.hello, and reads the new ServerHello into hs.serverHello. |