![]() |
![]() |
![]() |
libnm-util Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <nm-setting-8021x.h> enum NMSetting8021xCKType; #define NM_SETTING_802_1X_SETTING_NAME enum NMSetting8021xError; #define NM_TYPE_SETTING_802_1X_ERROR #define NM_SETTING_802_1X_ERROR GQuark nm_setting_802_1x_error_quark (void); #define NM_SETTING_802_1X_EAP #define NM_SETTING_802_1X_IDENTITY #define NM_SETTING_802_1X_ANONYMOUS_IDENTITY #define NM_SETTING_802_1X_CA_CERT #define NM_SETTING_802_1X_CA_PATH #define NM_SETTING_802_1X_CLIENT_CERT #define NM_SETTING_802_1X_PHASE1_PEAPVER #define NM_SETTING_802_1X_PHASE1_PEAPLABEL #define NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING #define NM_SETTING_802_1X_PHASE2_AUTH #define NM_SETTING_802_1X_PHASE2_AUTHEAP #define NM_SETTING_802_1X_PHASE2_CA_CERT #define NM_SETTING_802_1X_PHASE2_CA_PATH #define NM_SETTING_802_1X_PHASE2_CLIENT_CERT #define NM_SETTING_802_1X_PASSWORD #define NM_SETTING_802_1X_PRIVATE_KEY #define NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD #define NM_SETTING_802_1X_PHASE2_PRIVATE_KEY #define NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD #define NM_SETTING_802_1X_PIN #define NM_SETTING_802_1X_PSK #define NM_SETTING_802_1X_SYSTEM_CA_CERTS NMSetting8021x; GType nm_setting_802_1x_get_type (void); NMSetting * nm_setting_802_1x_new (void); guint32 nm_setting_802_1x_get_num_eap_methods (NMSetting8021x *setting); const char * nm_setting_802_1x_get_eap_method (NMSetting8021x *setting, guint32 i); gboolean nm_setting_802_1x_add_eap_method (NMSetting8021x *setting, const char *eap); void nm_setting_802_1x_remove_eap_method (NMSetting8021x *setting, guint32 i); void nm_setting_802_1x_clear_eap_methods (NMSetting8021x *setting); const char * nm_setting_802_1x_get_identity (NMSetting8021x *setting); const char * nm_setting_802_1x_get_anonymous_identity (NMSetting8021x *setting); const GByteArray * nm_setting_802_1x_get_ca_cert (NMSetting8021x *setting); const char * nm_setting_802_1x_get_ca_path (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_ca_cert_from_file (NMSetting8021x *setting, const char *filename, NMSetting8021xCKType *out_ck_type, GError **err); const GByteArray * nm_setting_802_1x_get_client_cert (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_client_cert_from_file (NMSetting8021x *setting, const char *filename, NMSetting8021xCKType *out_ck_type, GError **err); const char * nm_setting_802_1x_get_phase1_peapver (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase1_peaplabel (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase1_fast_provisioning (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase2_auth (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase2_autheap (NMSetting8021x *setting); const GByteArray * nm_setting_802_1x_get_phase2_ca_cert (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase2_ca_path (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_phase2_ca_cert_from_file (NMSetting8021x *setting, const char *filename, NMSetting8021xCKType *out_ck_type, GError **err); gboolean nm_setting_802_1x_get_system_ca_certs (NMSetting8021x *setting); const GByteArray * nm_setting_802_1x_get_phase2_client_cert (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_phase2_client_cert_from_file (NMSetting8021x *setting, const char *filename, NMSetting8021xCKType *out_ck_type, GError **err); const char * nm_setting_802_1x_get_password (NMSetting8021x *setting); const char * nm_setting_802_1x_get_pin (NMSetting8021x *setting); const char * nm_setting_802_1x_get_psk (NMSetting8021x *setting); const GByteArray * nm_setting_802_1x_get_private_key (NMSetting8021x *setting); const char * nm_setting_802_1x_get_private_key_password (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_private_key_from_file (NMSetting8021x *setting, const char *filename, const char *password, NMSetting8021xCKType *out_ck_type, GError **err); NMSetting8021xCKType nm_setting_802_1x_get_private_key_type (NMSetting8021x *setting); const GByteArray * nm_setting_802_1x_get_phase2_private_key (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase2_private_key_password (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_phase2_private_key_from_file (NMSetting8021x *setting, const char *filename, const char *password, NMSetting8021xCKType *out_ck_type, GError **err); NMSetting8021xCKType nm_setting_802_1x_get_phase2_private_key_type (NMSetting8021x *setting);
"anonymous-identity" gchar* : Read / Write "ca-path" gchar* : Read / Write "identity" gchar* : Read / Write "password" gchar* : Read / Write "phase1-fast-provisioning" gchar* : Read / Write "phase1-peaplabel" gchar* : Read / Write "phase1-peapver" gchar* : Read / Write "phase2-auth" gchar* : Read / Write "phase2-autheap" gchar* : Read / Write "phase2-ca-path" gchar* : Read / Write "phase2-private-key-password" gchar* : Read / Write "private-key-password" gchar* : Read / Write "system-ca-certs" gboolean : Read / Write / Construct
The NMSetting8021x object is a NMSetting subclass that describes properties necessary for connection to 802.1x-authenticated networks, such as WPA and WPA2 Enterprise WiFi networks and wired 802.1x networks. 802.1x connections typically use certificates and/or EAP authentication methods to securely verify, identify, and authenticate the client to the network itself, instead of simply relying on a widely shared static key.
It's a good idea to read up on wpa_supplicant configuration before using this setting extensively, since most of the options here correspond closely with the relevant wpa_supplicant configuration options.
Furthermore, to get a good idea of 802.1x, EAP, TLS, TTLS, etc and their applications to WiFi and wired networks, you'll want to get copies of the following books.
802.11 Wireless Networks: The Definitive Guide, Second Edition Author: Matthew Gast ISBN: 978-0596100520
Cisco Wireless LAN Security Authors: Krishna Sankar, Sri Sundaralingam, Darrin Miller, and Andrew Balinsky ISBN: 978-1587051548
typedef enum { NM_SETTING_802_1X_CK_TYPE_UNKNOWN = 0, NM_SETTING_802_1X_CK_TYPE_X509, NM_SETTING_802_1X_CK_TYPE_RAW_KEY, NM_SETTING_802_1X_CK_TYPE_PKCS12 } NMSetting8021xCKType;
typedef enum { NM_SETTING_802_1X_ERROR_UNKNOWN = 0, NM_SETTING_802_1X_ERROR_INVALID_PROPERTY, NM_SETTING_802_1X_ERROR_MISSING_PROPERTY } NMSetting8021xError;
#define NM_TYPE_SETTING_802_1X_ERROR (nm_setting_802_1x_error_get_type ())
#define NM_SETTING_802_1X_ANONYMOUS_IDENTITY "anonymous-identity"
#define NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING "phase1-fast-provisioning"
#define NM_SETTING_802_1X_PHASE2_CLIENT_CERT "phase2-client-cert"
#define NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD "private-key-password"
#define NM_SETTING_802_1X_PHASE2_PRIVATE_KEY "phase2-private-key"
#define NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD "phase2-private-key-password"
guint32 nm_setting_802_1x_get_num_eap_methods (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_eap_method (NMSetting8021x *setting, guint32 i);
|
|
|
|
Returns : |
gboolean nm_setting_802_1x_add_eap_method (NMSetting8021x *setting, const char *eap);
|
|
|
|
Returns : |
void nm_setting_802_1x_remove_eap_method (NMSetting8021x *setting, guint32 i);
|
|
|
void nm_setting_802_1x_clear_eap_methods (NMSetting8021x *setting);
|
const char * nm_setting_802_1x_get_identity (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_anonymous_identity (NMSetting8021x *setting);
|
|
Returns : |
const GByteArray * nm_setting_802_1x_get_ca_cert (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_ca_path (NMSetting8021x *setting);
|
|
Returns : |
gboolean nm_setting_802_1x_set_ca_cert_from_file (NMSetting8021x *setting, const char *filename, NMSetting8021xCKType *out_ck_type, GError **err);
|
|
|
|
|
|
|
|
Returns : |
const GByteArray * nm_setting_802_1x_get_client_cert (NMSetting8021x *setting);
|
|
Returns : |
gboolean nm_setting_802_1x_set_client_cert_from_file (NMSetting8021x *setting, const char *filename, NMSetting8021xCKType *out_ck_type, GError **err);
|
|
|
|
|
|
|
|
Returns : |
const char * nm_setting_802_1x_get_phase1_peapver (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_phase1_peaplabel (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_phase1_fast_provisioning (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_phase2_auth (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_phase2_autheap (NMSetting8021x *setting);
|
|
Returns : |
const GByteArray * nm_setting_802_1x_get_phase2_ca_cert (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_phase2_ca_path (NMSetting8021x *setting);
|
|
Returns : |
gboolean nm_setting_802_1x_set_phase2_ca_cert_from_file (NMSetting8021x *setting, const char *filename, NMSetting8021xCKType *out_ck_type, GError **err);
|
|
|
|
|
|
|
|
Returns : |
gboolean nm_setting_802_1x_get_system_ca_certs (NMSetting8021x *setting);
|
|
Returns : |
const GByteArray * nm_setting_802_1x_get_phase2_client_cert (NMSetting8021x *setting);
|
|
Returns : |
gboolean nm_setting_802_1x_set_phase2_client_cert_from_file (NMSetting8021x *setting, const char *filename, NMSetting8021xCKType *out_ck_type, GError **err);
|
|
|
|
|
|
|
|
Returns : |
const char * nm_setting_802_1x_get_password (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_pin (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_psk (NMSetting8021x *setting);
|
|
Returns : |
const GByteArray * nm_setting_802_1x_get_private_key (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_private_key_password (NMSetting8021x *setting);
|
|
Returns : |
gboolean nm_setting_802_1x_set_private_key_from_file (NMSetting8021x *setting, const char *filename, const char *password, NMSetting8021xCKType *out_ck_type, GError **err);
|
|
|
|
|
|
|
|
|
|
Returns : |
NMSetting8021xCKType nm_setting_802_1x_get_private_key_type (NMSetting8021x *setting);
|
|
Returns : |
const GByteArray * nm_setting_802_1x_get_phase2_private_key (NMSetting8021x *setting);
|
|
Returns : |
const char * nm_setting_802_1x_get_phase2_private_key_password (NMSetting8021x *setting);
|
|
Returns : |
gboolean nm_setting_802_1x_set_phase2_private_key_from_file (NMSetting8021x *setting, const char *filename, const char *password, NMSetting8021xCKType *out_ck_type, GError **err);
|
|
|
|
|
|
|
|
|
|
Returns : |
NMSetting8021xCKType nm_setting_802_1x_get_phase2_private_key_type (NMSetting8021x *setting);
|
|
Returns : |
"anonymous-identity"
property"anonymous-identity" gchar* : Read / Write
Anonymous identity string for EAP authentication methods. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP-TTLS.
Default value: NULL
"ca-path"
property"ca-path" gchar* : Read / Write
UTF-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the "ca-cert" property.
Default value: NULL
"identity"
property"identity" gchar* : Read / Write
Identity string for EAP authentication methods. Often the user's user or login name.
Default value: NULL
"password"
property"password" gchar* : Read / Write
Password used for EAP authentication methods.
Default value: NULL
"phase1-fast-provisioning"
property"phase1-fast-provisioning" gchar* : Read / Write
Enables or disables in-line provisioning of EAP-FAST credentials when FAST is specified as the EAP method in the "eap" property. Recognized values are "0" (disabled), "1" (allow unauthenticated provisioning), "2" (allow authenticated provisioning), and "3" (allow both authenticated and unauthenticated provisioning). See the wpa_supplicant documentation for more details.
Default value: NULL
"phase1-peaplabel"
property"phase1-peaplabel" gchar* : Read / Write
Forces use of the new PEAP label during key derivation. Some RADIUS servers may require forcing the new PEAP label to interoperate with PEAPv1. Set to "1" to force use of the new PEAP label. See the wpa_supplicant documentation for more details.
Default value: NULL
"phase1-peapver"
property"phase1-peapver" gchar* : Read / Write
Forces which PEAP version is used when PEAP is set as the EAP method in the "eap" property. When unset, the version reported by the server will be used. Sometimes when using older RADIUS servers, it is necessary to force the client to use a particular PEAP version. To do so, this property may be set to "0" or "1" to force that specific PEAP version.
Default value: NULL
"phase2-auth"
property"phase2-auth" gchar* : Read / Write
Specifies the allowed "phase 2" inner non-EAP authentication methods when an EAP method that uses an inner TLS tunnel is specified in the "eap" property. Recognized non-EAP phase2 methods are "pap", "chap", "mschap", "mschapv2", "gtc", "otp", "md5", and "tls". Each 'phase 2' inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details.
Default value: NULL
"phase2-autheap"
property"phase2-autheap" gchar* : Read / Write
Specifies the allowed "phase 2" inner EAP-based authentication methods when an EAP method that uses an inner TLS tunnel is specified in the "eap" property. Recognized EAP-based phase2 methods are "md5", "mschapv2", "otp", "gtc", and "tls". Each 'phase 2' inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details.
Default value: NULL
"phase2-ca-path"
property"phase2-ca-path" gchar* : Read / Write
UTF-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the "phase2-ca-cert" property.
Default value: NULL
"phase2-private-key-password"
property"phase2-private-key-password" gchar* : Read / Write
The password used to decrypt the private key specified in
"phase2-private-key" if the private key is a PKCS12 format
key. Setting this property directly is not generally necessary except
when returning secrets to NetworkManager; it is generally set
automatically when setting the private key by the
nm_setting_802_1x_set_phase2_private_key_from_file()
function.
Default value: NULL
"private-key-password"
property"private-key-password" gchar* : Read / Write
The password used to decrypt the private key specified in
"private-key" if the private key is a PKCS12 format key.
Setting this property directly is not generally necessary except when
returning secrets to NetworkManager; it is generally set automatically
when setting the private key by the
nm_setting_802_1x_set_private_key_from_file()
function.
Default value: NULL
"system-ca-certs"
property"system-ca-certs" gboolean : Read / Write / Construct
When TRUE, overrides "ca-path" and "phase2-ca-path" properties using the system CA directory specified at configure time with the --system-ca-path switch. The certificates in this directory are added to the verification chain in addition to any certificates specified by the "ca-cert", "ca-cert-path", "phase2-ca-cert" and "phase2-ca-cert-path" properties.
Default value: FALSE