| 2162 |
2162 |
| 2163 /* Account options */ |
2163 /* Account options */ |
| 2164 option = purple_account_option_string_new(_("Connect server"), |
2164 option = purple_account_option_string_new(_("Connect server"), |
| 2165 "server", |
2165 "server", |
| 2166 "silc.silcnet.org"); |
2166 "silc.silcnet.org"); |
| 2167 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2167 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2168 option = purple_account_option_int_new(_("Port"), "port", 706); |
2168 option = purple_account_option_int_new(_("Port"), "port", 706); |
| 2169 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2169 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2170 g_snprintf(tmp, sizeof(tmp), "%s" G_DIR_SEPARATOR_S "public_key.pub", silcpurple_silcdir()); |
2170 g_snprintf(tmp, sizeof(tmp), "%s" G_DIR_SEPARATOR_S "public_key.pub", silcpurple_silcdir()); |
| 2171 option = purple_account_option_string_new(_("Public Key file"), |
2171 option = purple_account_option_string_new(_("Public Key file"), |
| 2172 "public-key", tmp); |
2172 "public-key", tmp); |
| 2173 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2173 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2174 g_snprintf(tmp, sizeof(tmp), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcpurple_silcdir()); |
2174 g_snprintf(tmp, sizeof(tmp), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcpurple_silcdir()); |
| 2175 option = purple_account_option_string_new(_("Private Key file"), |
2175 option = purple_account_option_string_new(_("Private Key file"), |
| 2176 "private-key", tmp); |
2176 "private-key", tmp); |
| 2177 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2177 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2178 |
2178 |
| 2179 for (i = 0; silc_default_ciphers[i].name; i++) { |
2179 for (i = 0; silc_default_ciphers[i].name; i++) { |
| 2180 kvp = g_new0(PurpleKeyValuePair, 1); |
2180 kvp = g_new0(PurpleKeyValuePair, 1); |
| 2181 kvp->key = g_strdup(silc_default_ciphers[i].name); |
2181 kvp->key = g_strdup(silc_default_ciphers[i].name); |
| 2182 kvp->value = g_strdup(silc_default_ciphers[i].name); |
2182 kvp->value = g_strdup(silc_default_ciphers[i].name); |
| 2183 list = g_list_append(list, kvp); |
2183 list = g_list_append(list, kvp); |
| 2184 } |
2184 } |
| 2185 option = purple_account_option_list_new(_("Cipher"), "cipher", list); |
2185 option = purple_account_option_list_new(_("Cipher"), "cipher", list); |
| 2186 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2186 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2187 |
2187 |
| 2188 list = NULL; |
2188 list = NULL; |
| 2189 for (i = 0; silc_default_hmacs[i].name; i++) { |
2189 for (i = 0; silc_default_hmacs[i].name; i++) { |
| 2190 kvp = g_new0(PurpleKeyValuePair, 1); |
2190 kvp = g_new0(PurpleKeyValuePair, 1); |
| 2191 kvp->key = g_strdup(silc_default_hmacs[i].name); |
2191 kvp->key = g_strdup(silc_default_hmacs[i].name); |
| 2192 kvp->value = g_strdup(silc_default_hmacs[i].name); |
2192 kvp->value = g_strdup(silc_default_hmacs[i].name); |
| 2193 list = g_list_append(list, kvp); |
2193 list = g_list_append(list, kvp); |
| 2194 } |
2194 } |
| 2195 option = purple_account_option_list_new(_("HMAC"), "hmac", list); |
2195 option = purple_account_option_list_new(_("HMAC"), "hmac", list); |
| 2196 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2196 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2197 |
2197 |
| 2198 option = purple_account_option_bool_new(_("Use Perfect Forward Secrecy"), |
2198 option = purple_account_option_bool_new(_("Use Perfect Forward Secrecy"), |
| 2199 "pfs", FALSE); |
2199 "pfs", FALSE); |
| 2200 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2200 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2201 |
2201 |
| 2202 option = purple_account_option_bool_new(_("Public key authentication"), |
2202 option = purple_account_option_bool_new(_("Public key authentication"), |
| 2203 "pubkey-auth", FALSE); |
2203 "pubkey-auth", FALSE); |
| 2204 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2204 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2205 option = purple_account_option_bool_new(_("Block IMs without Key Exchange"), |
2205 option = purple_account_option_bool_new(_("Block IMs without Key Exchange"), |
| 2206 "block-ims", FALSE); |
2206 "block-ims", FALSE); |
| 2207 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2207 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2208 option = purple_account_option_bool_new(_("Block messages to whiteboard"), |
2208 option = purple_account_option_bool_new(_("Block messages to whiteboard"), |
| 2209 "block-wb", FALSE); |
2209 "block-wb", FALSE); |
| 2210 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2210 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2211 option = purple_account_option_bool_new(_("Automatically open whiteboard"), |
2211 option = purple_account_option_bool_new(_("Automatically open whiteboard"), |
| 2212 "open-wb", FALSE); |
2212 "open-wb", FALSE); |
| 2213 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2213 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2214 option = purple_account_option_bool_new(_("Digitally sign and verify all messages"), |
2214 option = purple_account_option_bool_new(_("Digitally sign and verify all messages"), |
| 2215 "sign-verify", FALSE); |
2215 "sign-verify", FALSE); |
| 2216 protocol->protocol_options = g_list_append(protocol->protocol_options, option); |
2216 protocol->account_options = g_list_append(protocol->account_options, option); |
| 2217 } |
2217 } |
| 2218 |
2218 |
| 2219 static void |
2219 static void |
| 2220 silcpurple_protocol_class_init(PurpleProtocolClass *klass) |
2220 silcpurple_protocol_class_init(PurpleProtocolClass *klass) |
| 2221 { |
2221 { |