NetworkManager/libnm-util/dbus-helpers.h
Robert Love db98fe8137 2006-03-22 Robert Love <rml@novell.com>
Implement "Dynamic WEP", which is basically WPA authentication and WEP
	key exchange via WPA, ostensibly providing good security without
	requiring hardware that supports full WPA.  Also, add UI elements to
	allow the user to select the pairwise & group cipher for WPA Enterprise
	networks, too:
	* gnome/applet/applet.glade: Update glade file.
	* gnome/applet/nm-gconf-wso-wpa-eap.c: Serialize and deserialize the
	  key type, too, to and from gconf.
	* gnome/applet/wireless-security-option.c: Add "wpa_eap" parameter to
	  wso_wpa_create_key_type_model(), noting whether we are handling PSK
	  or EAP configuration, and in the latter case add in "Dynamic WEP" if
	  the capabilities match.
	* gnome/applet/wso-private.h: Update wso_wpa_create_key_type_model()'s
	  prototype.
	* gnome/applet/wso-wpa-eap.c: Manage UI elements for the key type and
	  serialize from UI to DBUS.
	* gnome/applet/wso-wpa-psk.c: Cannot fail and always returns at least
	  one element.
	* libnm-util/dbus-helpers.c: Update nmu_security_serialize_wpa_eap(),
	  nmu_security_serialize_wpa_eap_with_cipher(), and
	  nmu_security_deserialize_wpa_eap() to take a "key_type" parameter and
	  serialize/deserialize the key type via DBUS as the new third DBUS
	  parameter.
	* libnm-util/dbus-helpers.h: Update prototypes.
	* src/nm-ap-security-wpa-eap.c: Deserialize the key type from DBUS,
	  too.  If the key type is WEP104, do Dynamic WEP, which means
	  "IEEE8021X" for "key_mgmt".  Also add support for user-specified
	  pairwise and group ciphers (fixes a FIXME).


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1628 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-22 19:52:41 +00:00

114 lines
4.1 KiB
C

/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
*
* Dan Williams <dcbw@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* (C) Copyright 2005 Red Hat, Inc.
*/
#ifndef DBUS_HELPERS_H
#define DBUS_HELPERS_H
#include <dbus/dbus.h>
#include "cipher.h"
#ifdef __cplusplus
extern "C" {
#endif
dbus_bool_t nmu_security_serialize_wep (DBusMessageIter *iter,
const char *key,
int auth_alg);
dbus_bool_t nmu_security_deserialize_wep (DBusMessageIter *iter,
char **key,
int *key_len,
int *auth_alg);
dbus_bool_t nmu_security_serialize_none_with_cipher (DBusMessage *message);
dbus_bool_t nmu_security_serialize_wep_with_cipher (DBusMessage *message,
IEEE_802_11_Cipher *cipher,
const char *ssid,
const char *input,
int auth_alg);
dbus_bool_t nmu_security_serialize_wpa_psk (DBusMessageIter *iter,
const char *key,
int wpa_version,
int key_mgt);
dbus_bool_t nmu_security_deserialize_wpa_psk (DBusMessageIter *iter,
char **key,
int *key_len,
int *wpa_version,
int *key_mgt);
dbus_bool_t nmu_security_serialize_wpa_psk_with_cipher (DBusMessage *message,
IEEE_802_11_Cipher *cipher,
const char *ssid,
const char *input,
int wpa_version,
int key_mgt);
dbus_bool_t nmu_security_serialize_wpa_eap (DBusMessageIter *iter,
int eap_method,
int key_type,
const char *identity,
const char *passwd,
const char *anon_identity,
const char *private_key_passwd,
const char *private_key_file,
const char *client_cert_file,
const char *ca_cert_file,
int wpa_version);
dbus_bool_t nmu_security_serialize_wpa_eap_with_cipher (DBusMessageIter *iter,
int eap_method,
int key_type,
const char *identity,
const char *passwd,
const char *anon_identity,
const char *private_key_passwd,
const char *private_key_file,
const char *client_cert_file,
const char *ca_cert_file,
int wpa_version);
dbus_bool_t nmu_security_deserialize_wpa_eap (DBusMessageIter *iter,
int *eap_method,
int *key_type,
char **identity,
char **passwd,
char **anon_identity,
char **private_key_passwd,
char **private_key_file,
char **client_cert_file,
char **ca_cert_file,
int *wpa_version);
DBusMessage * nmu_create_dbus_error_message (DBusMessage *message,
const char *exception_namespace,
const char *exception,
const char *format,
...);
#ifdef __cplusplus
}
#endif
#endif /* DBUS_HELPERS_H */