code: func (hs *serverHandshakeState) checkForResumption() bool {
  	c := hs.c
  
  	if c.config.SessionTicketsDisabled {
  		return false
  	}
  
  	var ok bool
  	var sessionTicket = append([]uint8{}, hs.clientHello.sessionTicket...)
  	if hs.sessionState, ok = c.decryptTicket(sessionTicket); !ok {
  		return false
  	}
  
  	if hs.sessionState.vers > hs.clientHello.vers {
  		return false
  	}
  	if vers, ok := c.config.mutualVersion(hs.sessionState.vers); !ok || vers != hs.sessionState.vers {
  		return false
  	}
  
  	cipherSuiteOk := false
  	// Check that the client is still offering the ciphersuite in the session.
  	for _, id := range hs.clientHello.cipherSuites {
  		if id == hs.sessionState.cipherSuite {
  			cipherSuiteOk = true
  			break
  		}
  	}
  	if !cipherSuiteOk {
  		return false
  	}
  
  	// Check that we also support the ciphersuite from the session.
  	if !hs.setCipherSuite(hs.sessionState.cipherSuite, c.config.cipherSuites(), hs.sessionState.vers) {
  		return false
  	}
  
  	sessionHasClientCerts := len(hs.sessionState.certificates) != 0
  	needClientCerts := c.config.ClientAuth == RequireAnyClientCert || c.config.ClientAuth == RequireAndVerifyClientCert
  	if needClientCerts && !sessionHasClientCerts {
  		return false
  	}
  	if sessionHasClientCerts && c.config.ClientAuth == NoClientCert {
  		return false
  	}
  
  	return true
  }
docs: // checkForResumption reports whether we should perform resumption on this connection.