incSeq increments the sequence number.
()
| 245 | |
| 246 | // incSeq increments the sequence number. |
| 247 | func (hc *halfConn) incSeq() { |
| 248 | for i := 7; i >= 0; i-- { |
| 249 | hc.seq[i]++ |
| 250 | if hc.seq[i] != 0 { |
| 251 | return |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | // Not allowed to let sequence number wrap. |
| 256 | // Instead, must renegotiate before it does. |
| 257 | // Not likely enough to bother. |
| 258 | panic("TLS: sequence number wraparound") |
| 259 | } |
| 260 | |
| 261 | // explicitNonceLen returns the number of bytes of explicit nonce or IV included |
| 262 | // in each record. Explicit nonces are present only in CBC modes after TLS 1.0 |