summaryrefslogtreecommitdiff
path: root/libnm-util/nm-setting-8021x.c
Commit message (Collapse)AuthorAgeFilesLines
* libnm-util: add ifcfg-rh specific description for propertiesjk/bgo683111-keyfile-ifcfg-rh-docsJiří Klimeš2014-08-291-0/+234
| | | | | as comments in libnm-util/nm-setting-*.c files The comments are parsed by generate-plugin-docs.pl script.
* libnm-util: fix warning converting between enum types in nm-setting-8021x.cThomas Haller2014-08-011-2/+7
| | | | | | | | | | | | | | | clang warns: make[4]: Entering directory `./NetworkManager/libnm-util' CC nm-setting-8021x.lo nm-setting-8021x.c:1824:17: error: implicit conversion from enumeration type 'NMCryptoFileFormat' to different enumeration type 'NMSetting8021xCKFormat' [-Werror,-Wenum-conversion] *out_format = format; ~ ^~~~~~ nm-setting-8021x.c:2135:17: error: implicit conversion from enumeration type 'NMCryptoFileFormat' to different enumeration type 'NMSetting8021xCKFormat' [-Werror,-Wenum-conversion] *out_format = format; ~ ^~~~~~ Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-util, libnm-glib: whitespace fixesDan Winship2014-07-151-9/+15
| | | | Fix indentation, kill trailing whitespace, split some long lines.
* libnm-util, libnm-glib: standardize copyright/license headersDan Winship2014-07-151-5/+2
| | | | | | | | | | | | | | | | | | - Remove list of authors from files that had them; these serve no purpose except to quickly get out of date (and were only used in libnm-util and not libnm-glib anyway). - Just say "Copyright", not "(C) Copyright" or "Copyright (C)" - Put copyright statement after the license, not before - Remove "NetworkManager - Network link manager" from the few files that contained it, and "libnm_glib -- Access network status & information from glib applications" from the many files that contained it. - Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline to files that were missing it.
* libnm-util: remove NMSetting* GParamSpec docsDan Winship2014-06-191-343/+135
| | | | | | | | | | | | Remove all the GParamSpec docs, since everything now uses the gtk-doc docs instead, so there's no point in having two copies of each (which are often out of sync anyway). Since we're touching so many lines anyway, also fix up the indentation of the remaining property-installing lines, and add G_PARAM_STATIC_STRINGS to each paramspec (so the nick strings don't get strduped). Also, be consistent about starting a new line between "g_object_class_install_property" and its opening parenthesis.
* libnm-util: various NMSetting* property doc fixes/improvementsDan Winship2014-06-191-62/+135
| | | | | | | | | | Fix up various issues with the docs for the NMSetting properties, and pull in text from the GParamSpec docs where the GParamSpec docs were better (or contained information that is necessary in the context of nm-settings.5). Also, consistently wrap all of the doc comments to the same width (80 columns).
* libnm-util: fix gtk-doc bugs in NMSetting* propertiesDan Winship2014-06-191-1/+1
| | | | | | | | Fix misused gtk-doc annotations and incorrectly-identified properties. In particular, the upcoming introspection-based generate-settings-spec expands macro and enum values, so if you use '%' where you should have used '#', it will fail to find an expansion, and error out.
* libnm-util, libnm-glib: be consistent about "Wi-Fi", "Ethernet", ↵Dan Winship2014-06-191-2/+2
| | | | | | | | | "InfiniBand" in docs We made the UIs consistent last year, but missed the documentation. Fix the docs to also consistently use "Wi-Fi" rather than "WiFi", "Wifi", "wifi", or "WiFI"; "Ethernet" rather than "ethernet"; and "InfiniBand" rather than "Infiniband".
* libnm-util: return better error messages on failures for _set_ functionsJiří Klimeš2014-05-121-24/+34
|
* libnm-util: add *_remove_*_by_value() functions for '802-1x' settingJiří Klimeš2014-02-281-0/+99
| | | | | | nm_setting_802_1x_remove_eap_method_by_value() nm_setting_802_1x_remove_altsubject_match_by_value() nm_setting_802_1x_remove_phase2_altsubject_match_by_value()
* libnm-util: fix adding values to 'phase2-altsubject-matches'Jiří Klimeš2014-02-251-5/+6
| | | | It was mixed up with 'altsubject-matches'.
* libnm-util: fix verify_identity() in '802-1x' settingJiří Klimeš2014-02-251-0/+2
| | | | | We need to return FALSE on error, otherwise we pile GErrors and assert in nm_setting_verify().
* docs: use %TRUE, %FALSE macros instead of plain TRUE, FALSE values for gtkdocJiří Klimeš2014-02-241-13/+13
|
* libnm-util: refactor NMSetting name and register_settingsThomas Haller2013-12-121-1/+0
| | | | | | | | | | | | | | | | - refactor register_settings to allow lookup by GType and add the settings name to SettingInfo. - setting NM_SETTING_NAME is deprecated and should not be set anymore. Indeed it has always be a bug, to reset the name to a different value. The only valid place to set the name was in the _init() function of the derived class itself. This is now no longer needed/possible. Instead the name get's detected based on the registered setting types. This makes use of the registered metadata that is available anyway since every usable setting has to register itself. Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-util: remove usage of NM_SETTING_PARAM_SERIALIZEDan Williams2013-12-021-32/+32
| | | | | The only property that is not serializes is each settings' 'name' property, so the flag serves no purpose.
* core: add support for EAP-PWD authenticationjvoisin2013-10-231-3/+4
|
* libnm-util: prefix errors with 'setting.property' instead of 'property' onlyJiří Klimeš2013-06-131-30/+30
|
* libnm-util: deprecate nm_utils_slist_free(), use g_slist_free_full()Dan Winship2013-05-291-9/+9
|
* libnm-util: sync some 802.1x function arguments with documentationDan Williams2013-05-281-36/+36
|
* libnm-util: implement connection changed signalDan Williams2013-05-281-10/+61
| | | | | Emitted whenever settings are added or removed from the connection, and whenever any property of any setting in the connection is changed.
* libnm-util: clarify 802.1x password and password-raw documentationDan Williams2013-05-031-2/+7
|
* Use %NULL macro in doc stringsMartin Pitt2013-04-191-10/+10
| | | | | | Mass-converted "NULL" to "%NULL" in docstrings with find -name '*.c'| xargs sed -i '/^ \*.*[^%]NULL/ s/NULL\b/%NULL/g'
* libnm-util: install :pin and :pin-flags as properties for NMSetting8021xJiří Klimeš2013-03-261-0/+41
| | | | | GLib-GObject-WARNING **: g_object_get_property: object class `NMSetting8021x' has no property named `pin' GLib-GObject-WARNING **: g_object_get_property: object class `NMSetting8021x' has no property named `pin-flags'
* libnm-util: make property verification errors more descriptiveJiří Klimeš2013-03-131-94/+135
| | | | | | - fix g_set_error()/g_set_error_literal() usage - make the error messages translatable - use g_prefix_error() to prepend property name
* libnm-util: free temporary GByteArray when using ↵Dan Williams2013-03-081-37/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NM_SETTING_802_1X_CK_SCHEME_PATH If the certificate's format was valid, but we're asked to refer to it by paths instead of using the raw data, 'data' would be leaked. ==23089== 8,232 (40 direct, 8,192 indirect) bytes in 1 blocks are definitely lost in loss record 5,109 of 5,123 ==23089== at 0x4A0881C: malloc (vg_replace_malloc.c:270) ==23089== by 0x39B905488E: g_malloc (gmem.c:159) ==23089== by 0x39B9068CA1: g_slice_alloc (gslice.c:1003) ==23089== by 0x39B9024539: g_array_sized_new (garray.c:195) ==23089== by 0x31FC0146EA: file_to_g_byte_array (crypto.c:319) ==23089== by 0x31FC01543B: crypto_load_and_verify_certificate (crypto.c:606) ==23089== by 0x31FC01ED26: nm_setting_802_1x_set_client_cert (nm-setting-8021x.c:819) ==23089== by 0xC6944A4: eap_tls_reader (reader.c:2316) ==23089== by 0xC692756: fill_8021x (reader.c:2714) ==23089== by 0xC696151: wireless_connection_from_ifcfg (reader.c:2832) ==23089== by 0xC698E3A: connection_from_file (reader.c:4316) ==23089== by 0xC69135C: nm_ifcfg_connection_new (nm-ifcfg-connection.c:119) ==23089== ==23089== 8,352 (160 direct, 8,192 indirect) bytes in 4 blocks are definitely lost in loss record 5,110 of 5,123 ==23089== at 0x4A0881C: malloc (vg_replace_malloc.c:270) ==23089== by 0x39B905488E: g_malloc (gmem.c:159) ==23089== by 0x39B9068CA1: g_slice_alloc (gslice.c:1003) ==23089== by 0x39B9024539: g_array_sized_new (garray.c:195) ==23089== by 0x31FC0146EA: file_to_g_byte_array (crypto.c:319) ==23089== by 0x31FC01543B: crypto_load_and_verify_certificate (crypto.c:606) ==23089== by 0x31FC01E5E6: nm_setting_802_1x_set_ca_cert (nm-setting-8021x.c:538) ==23089== by 0xC694DD8: eap_peap_reader (reader.c:2358) ==23089== by 0xC692756: fill_8021x (reader.c:2714) ==23089== by 0xC696151: wireless_connection_from_ifcfg (reader.c:2832) ==23089== by 0xC698E3A: connection_from_file (reader.c:4316) ==23089== by 0xC69135C: nm_ifcfg_connection_new (nm-ifcfg-connection.c:119)
* all: remove pointless NULL checksDan Winship2013-02-131-4/+2
| | | | | | | | | | | g_malloc(), etc, never return NULL, by API contract. Likewise, by extension, no other glib function ever returns NULL due to lack of memory. So remove lots of unnecessary checks (the vast majority of which would have immediately crashed had they ever run anyway, since g_set_error(), g_warning(), and nm_log_*() all need to allocate memory). https://bugzilla.gnome.org/show_bug.cgi?id=693678
* libnm-util: clean up setting registrationDan Williams2012-10-291-1/+6
| | | | | | | | | | | | Make setting type registration less icky; instead of having the connection register all the settings, have the settings themselves register that information at library load time. Putting this sort of thing in G_DEFINE_TYPE_WITH_CODE is apparently more standard than the home-rolled stuff we had before. Also document the priority stuff so when adding new settings, people know what priority to use. (cleanups by jklimes)
* all: Don't use ctype.h macrosDan Winship2012-09-261-1/+0
| | | | | | | | | The ctype macros (eg, isalnum(), tolower()) are locale-dependent. Use glib's ASCII-only versions instead. Also, replace isascii() with g_ascii_isprint(), since isascii() accepts control characters, which isn't what the code wanted in any of the places where it was using it.
* Use glib-mkenums to generate enum typesDan Winship2012-02-151-24/+0
| | | | | | | | | | | | | | | | | | | Rather than generating enum classes by hand (and complaining in each file that "this should really be standard"), use glib-mkenums. Unfortunately, we need a very new version of glib-mkenums in order to deal with NM's naming conventions and to fix a few other bugs, so just import that into the source tree temporarily. Also, to simplify the use of glib-mkenums, import Makefile.glib from https://bugzilla.gnome.org/654395. To avoid having to run glib-mkenums for every subdirectory of src/, add a new "generated" directory, and put the generated enums files there. Finally, use Makefile.glib for marshallers too, and generate separate ones for libnm-glib and NetworkManager.
* libnm-util: add 'pac-file' property for 8021x setting (used in EAP-FAST)Jiří Klimeš2012-01-271-1/+39
|
* settings: Add new password-raw and password-raw-flags properties to 8021x.Evan Broder2011-11-211-2/+88
| | | | | | | | | In cases where the actual password is non-ASCII, it may not be possible to deliver the 802.1x password as a D-Bus string. Instead provide an alternate field holding the password as a byte array. In cases where both a password and password-raw are supplied, password is preferred.
* docs: fix a wrong variable name in code documentationDan Williams2011-08-221-1/+1
|
* settings: add 802.1X setting properties for subject and altsubject matchesEvan Broder2011-08-191-0/+386
| | | | | | | | | | | | | | | Includes subject_match and phase2_subject_match (string) parameters, and altsubject_matches and phase2_altsubject_matches (list of string) parameters. subject_match is matched against a substring of the subject from the certificate presented by the remote authentication server. If this option is unset, no subject verification is performed. altsubject_matches are each tested against the alternate subject name (altSubjectName) of the certificate presented by the remote authentication server. If this option is unset, no verification of the altSubjectName is performed.
* libnm-util: more 802.1x setting documentation updatesDan Williams2011-07-021-3/+3
|
* libnm-util: update 802.1x setting documentationDan Williams2011-07-021-9/+6
|
* libnm-util: clarify certificate and key argument namesDan Williams2011-05-101-54/+54
| | | | | | | Clarify that these are supposed to be paths in the argument name; this shouldn't break API as it's just an argument rename. Helps users figure out what the argument should be without as much trouble as 'value', which is what it was before.
* libnm-util: fix misspelling in property documentationDan Williams2011-03-041-1/+1
|
* libnm-util: rework certificate and private key handlingDan Williams2011-03-021-258/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, it was not easily possible to set a private key without also providing a password. This used to be OK, but now with secret flags it may be the case that when the connection is read, there's no private key password. So functions that set the private key must account for NULL passwords. Unfortunately, the crytpo code did not handle this case well. We need to be able to independently (a) verify that a file looks like a certificate or private key and (b) that a given password decrypts a private key. Previously the crypto code would fail to verify the file when the password was NULL. So this change fixes up the crytpo code for a more distinct split between these two operations, such that if no password is given, the file is still checked to ensure that it's a private key or a certificate. If a password is given, the password is checked against the private key file. This commit also changes how private keys and certificates were handled with the BLOB scheme. Previously only the first certificate or first private key was included in the property data, while now the entire file is encoded in the data. This is intended to fix cases where multiple private keys or certificates are present in a PEM file. It also allows clients to push certificate data to NetworkManager for storage in system settings locations, which was not as flexible before when only part of the certificate or key was sent as the data.
* libnm-util: NM_SETTING_SECRET_FLAG_SYSTEM_OWNED -> NM_SETTING_SECRET_FLAG_NONEDan Williams2011-02-061-10/+10
| | | | | Make it a bit clearer that this value is not actually a value that can be used as a flag, since its 0x00.
* libnm-util: private keys are now required for TLS connections to verifyDan Williams2011-02-021-12/+32
| | | | | Since private keys are no longer secret, they must be given in the connection itself.
* libnm-util: fix handling of secrets flagsDan Williams2011-01-311-3/+4
| | | | | It's a bitfield, not a single value. Update GObject property max accordingly.
* libnm-util: add secret flags for each secret describing how the secret is storedDan Williams2011-01-291-14/+177
| | | | | | | | | | | | This allows the necessary flexibility when handling secrets; otherwise it wouldn't be known when NM should save secrets returned from agents to backing storage, or when the agents should store the secrets. We can't simply use lack of a secret in persistent storage as the indicator of this, as (for example) when creating a new connection without secrets the storage method would be abmiguous. At the same time, fold in "always ask" functionality for OTP tokens so user agents don't have to store that attribute themselves out-of-band.
* libnm-util: remove 802.1x PSK functions and definesDan Williams2011-01-281-18/+1
| | | | | | There was never a property for it anyway, so it never got serialized across D-Bus, because it was folded into the "password" property in wpa_supplicant between 0.5 and 0.6.
* libnm-util: remove deprecated 802.1x cert blob functionsDan Williams2011-01-271-426/+0
|
* libnm-util: client certificate should not be required to set private key ↵Dan Williams2009-12-081-133/+118
| | | | | | | (bgo #585570) Not sure what I was thinking originally; there's no way this was correct in the first place.
* doc: fix up 802.1x setting documentationDan Williams2009-11-161-84/+220
|
* libnm-util: fix checking for TLS and TTLS phase2 secretsDan Williams2009-10-181-24/+67
| | | | | | | | | | Two errors here; first, need_secrets_tls() was not updated correctly for the certificate paths changes that landed recently, and would have incorrectly returned "no secrets required" for the PATH scheme. Second, an incorrect strcmp() comparison in need_secrets_phase2() meant that the wrong TTLS phase2 method would get asked if it required secrets.
* libnm-util: fix build with gcc 4.4 - pass string format to g_set_errorAlexander Sack2009-09-301-1/+1
|
* doc: 802-1x doc fixesDan Williams2009-09-281-1/+1
|
* libnm-util: doc fixesDan Williams2009-09-281-1/+3
|