code: func (hs *serverHandshakeState) setCipherSuite(id uint16, supportedCipherSuites []uint16, version uint16) bool {
  	for _, supported := range supportedCipherSuites {
  		if id == supported {
  			var candidate *cipherSuite
  
  			for _, s := range cipherSuites {
  				if s.id == id {
  					candidate = s
  					break
  				}
  			}
  			if candidate == nil {
  				continue
  			}
  			// Don't select a ciphersuite which we can't
  			// support for this client.
  			if candidate.flags&suiteECDHE != 0 {
  				if !hs.ellipticOk {
  					continue
  				}
  				if candidate.flags&suiteECDSA != 0 {
  					if !hs.ecdsaOk {
  						continue
  					}
  				} else if !hs.rsaSignOk {
  					continue
  				}
  			} else if !hs.rsaDecryptOk {
  				continue
  			}
  			if version < VersionTLS12 && candidate.flags&suiteTLS12 != 0 {
  				continue
  			}
  			hs.suite = candidate
  			return true
  		}
  	}
  	return false
  }
docs: // setCipherSuite sets a cipherSuite with the given id as the serverHandshakeState
  // suite if that cipher suite is acceptable to use.
  // It returns a bool indicating if the suite was set.