diff --git a/src/gsupplicant.c b/src/gsupplicant.c index dce4a41..ef5e677 100644 --- a/src/gsupplicant.c +++ b/src/gsupplicant.c @@ -939,7 +939,9 @@ gsupplicant_class_init( { int i; G_OBJECT_CLASS(klass)->finalize = gsupplicant_finalize; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_type_class_add_private(klass, sizeof(GSupplicantPriv)); + G_GNUC_END_IGNORE_DEPRECATIONS for (i=0; idispose = gsupplicant_bss_dispose; object_class->finalize = gsupplicant_bss_finalize; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_type_class_add_private(klass, sizeof(GSupplicantBSSPriv)); + G_GNUC_END_IGNORE_DEPRECATIONS for (i=0; ica_cert_file, blobs); const char* client_cert = gsupplicant_check_blob_or_abs_path(np->client_cert_file, blobs); + const char* private_key = + gsupplicant_check_blob_or_abs_path(np->private_key_file, blobs); const char* method = gsupplicant_eap_method_name(np->eap, &found); GASSERT(found == np->eap); /* Only one method should be specified */ gsupplicant_dict_add_string_ne(builder, "eap", method); @@ -543,22 +545,19 @@ gsupplicant_interface_add_network_args_security_eap( gsupplicant_dict_add_string_ne(builder, "password", np->passphrase); gsupplicant_dict_add_string0(builder, "ca_cert", ca_cert); if (client_cert) { - if (np->private_key_file && np->private_key_file[0]) { - const char* private_key = - gsupplicant_check_blob_or_abs_path(np->private_key_file, - blobs); - if (private_key) { - gsupplicant_dict_add_string(builder, "client_cert", - client_cert); - gsupplicant_dict_add_string(builder, "private_key", - private_key); - gsupplicant_dict_add_string_ne(builder, "private_key_passwd", - np->private_key_passphrase); - } + if (private_key) { + gsupplicant_dict_add_string(builder, "client_cert", + client_cert); } else { GWARN("Missing private key"); } } + if (private_key) { + gsupplicant_dict_add_string(builder, "private_key", + private_key); + gsupplicant_dict_add_string_ne(builder, "private_key_passwd", + np->private_key_passphrase); + } gsupplicant_dict_add_string_ne(builder, "domain_match", np->domain_match); gsupplicant_dict_add_string_ne(builder, "subject_match", @@ -3235,7 +3234,9 @@ gsupplicant_interface_class_init( GObjectClass* object_class = G_OBJECT_CLASS(klass); object_class->dispose = gsupplicant_interface_dispose; object_class->finalize = gsupplicant_interface_finalize; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_type_class_add_private(klass, sizeof(GSupplicantInterfacePriv)); + G_GNUC_END_IGNORE_DEPRECATIONS for (i=0; idispose = gsupplicant_network_dispose; object_class->finalize = gsupplicant_network_finalize; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_type_class_add_private(klass, sizeof(GSupplicantNetworkPriv)); + G_GNUC_END_IGNORE_DEPRECATIONS for (i=0; i