changeCipherSpec changes the encryption and MAC states to the ones previously passed to prepareCipherSpec.
()
| 220 | // changeCipherSpec changes the encryption and MAC states |
| 221 | // to the ones previously passed to prepareCipherSpec. |
| 222 | func (hc *halfConn) changeCipherSpec() error { |
| 223 | if hc.nextCipher == nil || hc.version == VersionTLS13 { |
| 224 | return alertInternalError |
| 225 | } |
| 226 | hc.cipher = hc.nextCipher |
| 227 | hc.mac = hc.nextMac |
| 228 | hc.nextCipher = nil |
| 229 | hc.nextMac = nil |
| 230 | for i := range hc.seq { |
| 231 | hc.seq[i] = 0 |
| 232 | } |
| 233 | return nil |
| 234 | } |
| 235 | |
| 236 | func (hc *halfConn) setTrafficSecret(suite *cipherSuiteTLS13, level QUICEncryptionLevel, secret []byte) { |
| 237 | hc.trafficSecret = secret |
no outgoing calls
no test coverage detected