()
| 382 | } |
| 383 | |
| 384 | func (hs *clientHandshakeStateTLS13) readServerParameters() error { |
| 385 | c := hs.c |
| 386 | |
| 387 | msg, err := c.readHandshake() |
| 388 | if err != nil { |
| 389 | return err |
| 390 | } |
| 391 | |
| 392 | encryptedExtensions, ok := msg.(*encryptedExtensionsMsg) |
| 393 | if !ok { |
| 394 | c.sendAlert(alertUnexpectedMessage) |
| 395 | return unexpectedMessageError(encryptedExtensions, msg) |
| 396 | } |
| 397 | hs.transcript.Write(encryptedExtensions.marshal()) |
| 398 | |
| 399 | if err := checkALPN(hs.hello.alpnProtocols, encryptedExtensions.alpnProtocol); err != nil { |
| 400 | c.sendAlert(alertUnsupportedExtension) |
| 401 | return err |
| 402 | } |
| 403 | c.clientProtocol = encryptedExtensions.alpnProtocol |
| 404 | |
| 405 | return nil |
| 406 | } |
| 407 | |
| 408 | func (hs *clientHandshakeStateTLS13) readServerCertificate() error { |
| 409 | c := hs.c |
no test coverage detected