char *client_cert_file;
char *private_key_file;
char *private_key_passphrase;
+ char *private_key_passphrase_type;
char *phase2;
- connman_bool_t passphrase_from_fsid;
};
struct connman_config {
g_free(service->client_cert_file);
g_free(service->private_key_file);
g_free(service->private_key_passphrase);
+ g_free(service->private_key_passphrase_type);
g_free(service->phase2);
g_free(service);
}
struct connman_config_service *service;
const char *ident;
char *str, *hex_ssid;
- gboolean pass_from_fsid;
- GError *error = NULL;
/* Strip off "service_" prefix */
ident = group + 8;
service->private_key_passphrase = str;
}
+ str = g_key_file_get_string(keyfile, group,
+ "PrivateKeyPassphraseType", NULL);
+ if (str != NULL) {
+ g_free(service->private_key_passphrase_type);
+ service->private_key_passphrase_type = str;
+ }
+
str = g_key_file_get_string(keyfile, group, "Identity", NULL);
if (str != NULL) {
g_free(service->identity);
service->phase2 = str;
}
- pass_from_fsid = g_key_file_get_boolean(keyfile, group,
- "PassphraseFromFsid", &error);
- if (error == NULL)
- service->passphrase_from_fsid = pass_from_fsid;
-
g_hash_table_replace(config->service_table, service->ident, service);
connman_info("Adding service configuration %s", service->ident);
__connman_service_set_string(service, "PrivateKeyFile",
config->private_key_file);
- if (config->passphrase_from_fsid == TRUE &&
+ if (g_strcmp0(config->private_key_passphrase_type, "fsid") == 0 &&
config->private_key_file) {
char *fsid;