()
| 446 | } |
| 447 | |
| 448 | func (hs *serverHandshakeState) doResumeHandshake() error { |
| 449 | c := hs.c |
| 450 | |
| 451 | hs.hello.cipherSuite = hs.suite.id |
| 452 | c.cipherSuite = hs.suite.id |
| 453 | // We echo the client's session ID in the ServerHello to let it know |
| 454 | // that we're doing a resumption. |
| 455 | hs.hello.sessionId = hs.clientHello.sessionId |
| 456 | hs.hello.ticketSupported = hs.sessionState.usedOldKey |
| 457 | hs.finishedHash = newFinishedHash(c.vers, hs.suite) |
| 458 | hs.finishedHash.discardHandshakeBuffer() |
| 459 | hs.finishedHash.Write(hs.clientHello.marshal()) |
| 460 | hs.finishedHash.Write(hs.hello.marshal()) |
| 461 | if _, err := c.writeRecord(recordTypeHandshake, hs.hello.marshal()); err != nil { |
| 462 | return err |
| 463 | } |
| 464 | |
| 465 | if err := c.processCertsFromClient(Certificate{ |
| 466 | Certificate: hs.sessionState.certificates, |
| 467 | }); err != nil { |
| 468 | return err |
| 469 | } |
| 470 | |
| 471 | if c.config.VerifyConnection != nil { |
| 472 | if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil { |
| 473 | c.sendAlert(alertBadCertificate) |
| 474 | return err |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | hs.masterSecret = hs.sessionState.masterSecret |
| 479 | |
| 480 | return nil |
| 481 | } |
| 482 | |
| 483 | func (hs *serverHandshakeState) doFullHandshake() error { |
| 484 | c := hs.c |
no test coverage detected