mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 19:50:07 +01:00
Make certs actually work. The private key is now a secret, and should be decrypted when requested by NM. The private key and phase2 private key passwords are no longer interesting to NM because they should be used by the settings service to decrypt the private key itself before passing it to NM, and hence have been removed as fields. * libnm-util/nm-setting-wireless-security.h libnm-util/nm-setting-wireless-security.c - Remove private-key-passwd and phase2-private-key-passwd from properties - (need_secrets_password, need_secrets_eappsk, need_secrets_sim, need_secrets): use property #defines instead strings to keep things consistent - (need_secrets_tls): if a client certificate is present but no private key, request the private key - (set_property, get_property, nm_setting_wireless_security_class_init): remove private key password stuff, mark private keys as secret * src/supplicant-manager/nm-supplicant-settings-verify.c - Remove private_key_passwd and private_key2_passwd from opt_table git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3080 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
97 lines
3.9 KiB
C
97 lines
3.9 KiB
C
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
|
|
|
|
#ifndef NM_SETTING_WIRELESS_SECURITY_H
|
|
#define NM_SETTING_WIRELESS_SECURITY_H
|
|
|
|
#include <nm-setting.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define NM_TYPE_SETTING_WIRELESS_SECURITY (nm_setting_wireless_security_get_type ())
|
|
#define NM_SETTING_WIRELESS_SECURITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_WIRELESS_SECURITY, NMSettingWirelessSecurity))
|
|
#define NM_SETTING_WIRELESS_SECURITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_WIRELESS_SECURITY, NMSettingWirelesSsecurityClass))
|
|
#define NM_IS_SETTING_WIRELESS_SECURITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_WIRELESS_SECURITY))
|
|
#define NM_IS_SETTING_WIRELESS_SECURITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTING_WIRELESS_SECURITY))
|
|
#define NM_SETTING_WIRELESS_SECURITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_WIRELESS_SECURITY, NMSettingWirelessSecurityClass))
|
|
|
|
#define NM_SETTING_WIRELESS_SECURITY_SETTING_NAME "802-11-wireless-security"
|
|
|
|
#define NM_SETTING_WIRELESS_SECURITY_KEY_MGMT "key-mgmt"
|
|
#define NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX "wep-tx-keyidx"
|
|
#define NM_SETTING_WIRELESS_SECURITY_AUTH_ALG "auth-alg"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PROTO "proto"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PAIRWISE "pairwise"
|
|
#define NM_SETTING_WIRELESS_SECURITY_GROUP "group"
|
|
#define NM_SETTING_WIRELESS_SECURITY_EAP "eap"
|
|
#define NM_SETTING_WIRELESS_SECURITY_IDENTITY "identity"
|
|
#define NM_SETTING_WIRELESS_SECURITY_ANONYMOUS_IDENTITY "anonymous-identity"
|
|
#define NM_SETTING_WIRELESS_SECURITY_CA_CERT "ca-cert"
|
|
#define NM_SETTING_WIRELESS_SECURITY_CA_PATH "ca-path"
|
|
#define NM_SETTING_WIRELESS_SECURITY_CLIENT_CERT "client-cert"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE1_PEAPVER "phase1-peapver"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE1_PEAPLABEL "phase1-peaplabel"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE1_FAST_PROVISIONING "phase1-fast-provisioning"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE2_AUTH "phase2-auth"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE2_AUTHEAP "phase2-autheap"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE2_CA_CERT "phase2-ca-cert"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE2_CA_PATH "phase2-ca-path"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE2_CLIENT_CERT "phase2-client-cert"
|
|
#define NM_SETTING_WIRELESS_SECURITY_NAI "nai"
|
|
#define NM_SETTING_WIRELESS_SECURITY_WEP_KEY0 "wep-key0"
|
|
#define NM_SETTING_WIRELESS_SECURITY_WEP_KEY1 "wep-key1"
|
|
#define NM_SETTING_WIRELESS_SECURITY_WEP_KEY2 "wep-key2"
|
|
#define NM_SETTING_WIRELESS_SECURITY_WEP_KEY3 "wep-key3"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PSK "psk"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PASSWORD "password"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PIN "pin"
|
|
#define NM_SETTING_WIRELESS_SECURITY_EAPPSK "eappsk"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PRIVATE_KEY "private-key"
|
|
#define NM_SETTING_WIRELESS_SECURITY_PHASE2_PRIVATE_KEY "phase2-private-key"
|
|
|
|
typedef struct {
|
|
NMSetting parent;
|
|
|
|
char *key_mgmt;
|
|
guint32 wep_tx_keyidx;
|
|
char *auth_alg;
|
|
GSList *proto; /* GSList of strings */
|
|
GSList *pairwise; /* GSList of strings */
|
|
GSList *group; /* GSList of strings */
|
|
GSList *eap; /* GSList of strings */
|
|
char *identity;
|
|
char *anonymous_identity;
|
|
GByteArray *ca_cert;
|
|
char *ca_path;
|
|
GByteArray *client_cert;
|
|
char *phase1_peapver;
|
|
char *phase1_peaplabel;
|
|
char *phase1_fast_provisioning;
|
|
char *phase2_auth;
|
|
char *phase2_autheap;
|
|
GByteArray *phase2_ca_cert;
|
|
char *phase2_ca_path;
|
|
GByteArray *phase2_client_cert;
|
|
char *nai;
|
|
char *wep_key0;
|
|
char *wep_key1;
|
|
char *wep_key2;
|
|
char *wep_key3;
|
|
char *psk;
|
|
char *password;
|
|
char *pin;
|
|
char *eappsk;
|
|
GByteArray *private_key;
|
|
GByteArray *phase2_private_key;
|
|
} NMSettingWirelessSecurity;
|
|
|
|
typedef struct {
|
|
NMSettingClass parent;
|
|
} NMSettingWirelessSecurityClass;
|
|
|
|
GType nm_setting_wireless_security_get_type (void);
|
|
|
|
NMSetting *nm_setting_wireless_security_new (void);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* NM_SETTING_WIRELESS_SECURITY_H */
|