+ * Authenticate with Tor on the control channel
+ */
+ private async void tor_control_auth () throws Error {
+ yield tor_control.authenticate_async (password);
+
+ var bridges = new SList<string> ();
+ try {
+ bridges = gconf.get_list (GCONF_KEY_BRIDGES, GConf.ValueType.STRING);
+ } catch (Error e) {
+ error ("Error loading bridges: %s", e.message);
+ return;
+ }
+
+ if (bridges.length () <= 0)
+ return;
+
+ // Enable bridge relays
+ tor_control.set_conf_list ("Bridge", bridges);
+ tor_control.set_conf_bool ("UseBridges", true);
+
+ bool use = yield tor_control.get_conf_bool_async ("UseBridges");
+ if (!use) {
+ Hildon.Banner.show_information (null, null,
+ "Failed to set up bridge relays");
+ }
+ }
+
+ /**