/* This function prepares a TLS object to work in client or server mode. */
EFI_STATUS EFIAPI TlsSetConnectionEnd(IN VOID *Tls, IN BOOLEAN IsServer)
/* This function prepares a TLS object to work in client or server mode. */
EFI_STATUS EFIAPI TlsSetConnectionEnd(IN VOID *Tls, IN BOOLEAN IsServer)
{
  TLS_CONNECTION  *TlsConn;
  TlsConn = (TLS_CONNECTION *)Tls;
  if ((TlsConn == NULL) || (TlsConn->Ssl == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  if (!IsServer) {
    SSL_set_connect_state (TlsConn->Ssl);
  } else {
    return EFI_UNSUPPORTED;
  }
  return EFI_SUCCESS;
}