nm_rs/auto/
setting8021x.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir
3// from gtk-girs (https://github.com/gtk-rs/gir-files)
4// DO NOT EDIT
5
6#[cfg(feature = "v1_8")]
7#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
8use crate::Setting8021xAuthFlags;
9use crate::{Setting, Setting8021xCKFormat, Setting8021xCKScheme, SettingSecretFlags, ffi};
10use glib::{
11    prelude::*,
12    signal::{SignalHandlerId, connect_raw},
13    translate::*,
14};
15use std::boxed::Box as Box_;
16
17glib::wrapper! {
18    /// IEEE 802.1x Authentication Settings
19    ///
20    /// ## Properties
21    ///
22    ///
23    /// #### `altsubject-matches`
24    ///  List of strings to be matched against the altSubjectName of the
25    /// certificate presented by the authentication server. If the list is empty,
26    /// no verification of the server certificate's altSubjectName is performed.
27    ///
28    /// Readable | Writeable
29    ///
30    ///
31    /// #### `anonymous-identity`
32    ///  Anonymous identity string for EAP authentication methods.  Used as the
33    /// unencrypted identity with EAP types that support different tunneled
34    /// identity like EAP-TTLS.
35    ///
36    /// Readable | Writeable
37    ///
38    ///
39    /// #### `auth-timeout`
40    ///  A timeout for the authentication. Zero means the global default; if the
41    /// global default is not set, the authentication timeout is 25 seconds.
42    ///
43    /// Readable | Writeable
44    ///
45    ///
46    /// #### `ca-cert`
47    ///  Contains the CA certificate if used by the EAP method specified in the
48    /// #NMSetting8021x:eap property.
49    ///
50    /// Certificate data is specified using a "scheme"; three are currently
51    /// supported: blob, path and pkcs#11 URL. When using the blob scheme this property
52    /// should be set to the certificate's DER encoded data. When using the path
53    /// scheme, this property should be set to the full UTF-8 encoded path of the
54    /// certificate, prefixed with the string "file://" and ending with a terminating
55    /// NUL byte.
56    /// This property can be unset even if the EAP method supports CA certificates,
57    /// but this allows man-in-the-middle attacks and is NOT recommended.
58    ///
59    /// Note that enabling NMSetting8021x:system-ca-certs will override this
60    /// setting to use the built-in path, if the built-in path is not a directory.
61    ///
62    /// Setting this property directly is discouraged; use the
63    /// nm_setting_802_1x_set_ca_cert() function instead.
64    ///
65    /// Readable | Writeable
66    ///
67    ///
68    /// #### `ca-cert-password`
69    ///  The password used to access the CA certificate stored in
70    /// #NMSetting8021x:ca-cert property. Only makes sense if the certificate
71    /// is stored on a PKCS#<!-- -->11 token that requires a login.
72    ///
73    /// Readable | Writeable
74    ///
75    ///
76    /// #### `ca-cert-password-flags`
77    ///  Flags indicating how to handle the #NMSetting8021x:ca-cert-password property.
78    ///
79    /// Readable | Writeable
80    ///
81    ///
82    /// #### `ca-path`
83    ///  UTF-8 encoded path to a directory containing PEM or DER formatted
84    /// certificates to be added to the verification chain in addition to the
85    /// certificate specified in the #NMSetting8021x:ca-cert property.
86    ///
87    /// If NMSetting8021x:system-ca-certs is enabled and the built-in CA
88    /// path is an existing directory, then this setting is ignored.
89    ///
90    /// Readable | Writeable
91    ///
92    ///
93    /// #### `client-cert`
94    ///  Contains the client certificate if used by the EAP method specified in
95    /// the #NMSetting8021x:eap property.
96    ///
97    /// Certificate data is specified using a "scheme"; two are currently
98    /// supported: blob and path. When using the blob scheme (which is backwards
99    /// compatible with NM 0.7.x) this property should be set to the
100    /// certificate's DER encoded data. When using the path scheme, this property
101    /// should be set to the full UTF-8 encoded path of the certificate, prefixed
102    /// with the string "file://" and ending with a terminating NUL byte.
103    ///
104    /// Setting this property directly is discouraged; use the
105    /// nm_setting_802_1x_set_client_cert() function instead.
106    ///
107    /// Readable | Writeable
108    ///
109    ///
110    /// #### `client-cert-password`
111    ///  The password used to access the client certificate stored in
112    /// #NMSetting8021x:client-cert property. Only makes sense if the certificate
113    /// is stored on a PKCS#<!-- -->11 token that requires a login.
114    ///
115    /// Readable | Writeable
116    ///
117    ///
118    /// #### `client-cert-password-flags`
119    ///  Flags indicating how to handle the #NMSetting8021x:client-cert-password property.
120    ///
121    /// Readable | Writeable
122    ///
123    ///
124    /// #### `domain-match`
125    ///  Constraint for server domain name. If set, this list of FQDNs is used as
126    /// a match requirement for dNSName element(s) of the certificate presented
127    /// by the authentication server.  If a matching dNSName is found, this
128    /// constraint is met.  If no dNSName values are present, this constraint is
129    /// matched against SubjectName CN using the same comparison.
130    /// Multiple valid FQDNs can be passed as a ";" delimited list.
131    ///
132    /// Readable | Writeable
133    ///
134    ///
135    /// #### `domain-suffix-match`
136    ///  Constraint for server domain name. If set, this FQDN is used as a suffix
137    /// match requirement for dNSName element(s) of the certificate presented by
138    /// the authentication server.  If a matching dNSName is found, this
139    /// constraint is met.  If no dNSName values are present, this constraint is
140    /// matched against SubjectName CN using same suffix match comparison.
141    /// Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited
142    /// list.
143    ///
144    /// Readable | Writeable
145    ///
146    ///
147    /// #### `eap`
148    ///  The allowed EAP method to be used when authenticating to the network with
149    /// 802.1x.  Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd",
150    /// and "fast".  Each method requires different configuration using the
151    /// properties of this setting; refer to wpa_supplicant documentation for the
152    /// allowed combinations.
153    ///
154    /// Readable | Writeable
155    ///
156    ///
157    /// #### `identity`
158    ///  Identity string for EAP authentication methods.  Often the user's user or
159    /// login name.
160    ///
161    /// Readable | Writeable
162    ///
163    ///
164    /// #### `openssl-ciphers`
165    ///  Define openssl_ciphers for wpa_supplicant. Openssl sometimes moves ciphers
166    /// among SECLEVELs, thus compiled-in default value in wpa_supplicant
167    /// (as modified by some linux distributions) sometimes prevents
168    /// to connect to old servers that do not support new protocols.
169    ///
170    /// Readable | Writeable
171    ///
172    ///
173    /// #### `optional`
174    ///  Whether the 802.1X authentication is optional. If [`true`], the activation
175    /// will continue even after a timeout or an authentication failure. Setting
176    /// the property to [`true`] is currently allowed only for Ethernet connections.
177    /// If set to [`false`], the activation can continue only after a successful
178    /// authentication.
179    ///
180    /// Readable | Writeable
181    ///
182    ///
183    /// #### `pac-file`
184    ///  UTF-8 encoded file path containing PAC for EAP-FAST.
185    ///
186    /// Readable | Writeable
187    ///
188    ///
189    /// #### `password`
190    ///  UTF-8 encoded password used for EAP authentication methods. If both the
191    /// #NMSetting8021x:password property and the #NMSetting8021x:password-raw
192    /// property are specified, #NMSetting8021x:password is preferred.
193    ///
194    /// Readable | Writeable
195    ///
196    ///
197    /// #### `password-flags`
198    ///  Flags indicating how to handle the #NMSetting8021x:password property.
199    ///
200    /// Readable | Writeable
201    ///
202    ///
203    /// #### `password-raw`
204    ///  Password used for EAP authentication methods, given as a byte array to
205    /// allow passwords in other encodings than UTF-8 to be used. If both the
206    /// #NMSetting8021x:password property and the #NMSetting8021x:password-raw
207    /// property are specified, #NMSetting8021x:password is preferred.
208    ///
209    /// Readable | Writeable
210    ///
211    ///
212    /// #### `password-raw-flags`
213    ///  Flags indicating how to handle the #NMSetting8021x:password-raw property.
214    ///
215    /// Readable | Writeable
216    ///
217    ///
218    /// #### `phase1-auth-flags`
219    ///  Specifies authentication flags to use in "phase 1" outer
220    /// authentication using #NMSetting8021xAuthFlags options.
221    /// The individual TLS versions can be explicitly disabled. TLS time checks
222    /// can be also disabled. If a certain TLS disable flag is not
223    /// set, it is up to the supplicant to allow or forbid it. The TLS options
224    /// map to tls_disable_tlsv1_x and tls_disable_time_checks settings.
225    /// See the wpa_supplicant documentation for more details.
226    ///
227    /// Readable | Writeable
228    ///
229    ///
230    /// #### `phase1-fast-provisioning`
231    ///  Enables or disables in-line provisioning of EAP-FAST credentials when
232    /// FAST is specified as the EAP method in the #NMSetting8021x:eap property.
233    /// Recognized values are "0" (disabled), "1" (allow unauthenticated
234    /// provisioning), "2" (allow authenticated provisioning), and "3" (allow
235    /// both authenticated and unauthenticated provisioning).  See the
236    /// wpa_supplicant documentation for more details.
237    ///
238    /// Readable | Writeable
239    ///
240    ///
241    /// #### `phase1-peaplabel`
242    ///  Forces use of the new PEAP label during key derivation.  Some RADIUS
243    /// servers may require forcing the new PEAP label to interoperate with
244    /// PEAPv1.  Set to "1" to force use of the new PEAP label.  See the
245    /// wpa_supplicant documentation for more details.
246    ///
247    /// Readable | Writeable
248    ///
249    ///
250    /// #### `phase1-peapver`
251    ///  Forces which PEAP version is used when PEAP is set as the EAP method in
252    /// the #NMSetting8021x:eap property.  When unset, the version reported by
253    /// the server will be used.  Sometimes when using older RADIUS servers, it
254    /// is necessary to force the client to use a particular PEAP version.  To do
255    /// so, this property may be set to "0" or "1" to force that specific PEAP
256    /// version.
257    ///
258    /// Readable | Writeable
259    ///
260    ///
261    /// #### `phase2-altsubject-matches`
262    ///  List of strings to be matched against the altSubjectName of the
263    /// certificate presented by the authentication server during the inner
264    /// "phase 2" authentication. If the list is empty, no verification of the
265    /// server certificate's altSubjectName is performed.
266    ///
267    /// Readable | Writeable
268    ///
269    ///
270    /// #### `phase2-auth`
271    ///  Specifies the allowed "phase 2" inner authentication method when an EAP
272    /// method that uses an inner TLS tunnel is specified in the #NMSetting8021x:eap
273    /// property.  For TTLS this property selects one of the supported non-EAP
274    /// inner methods: "pap", "chap", "mschap", "mschapv2" while
275    /// #NMSetting8021x:phase2-autheap selects an EAP inner method.  For PEAP
276    /// this selects an inner EAP method, one of: "gtc", "otp", "md5" and "tls".
277    /// Each "phase 2" inner method requires specific parameters for successful
278    /// authentication; see the wpa_supplicant documentation for more details.
279    /// Both #NMSetting8021x:phase2-auth and #NMSetting8021x:phase2-autheap cannot
280    /// be specified.
281    ///
282    /// Readable | Writeable
283    ///
284    ///
285    /// #### `phase2-autheap`
286    ///  Specifies the allowed "phase 2" inner EAP-based authentication method
287    /// when TTLS is specified in the #NMSetting8021x:eap property.  Recognized
288    /// EAP-based "phase 2" methods are "md5", "mschapv2", "otp", "gtc", and
289    /// "tls". Each "phase 2" inner method requires specific parameters for
290    /// successful authentication; see the wpa_supplicant documentation for
291    /// more details.
292    ///
293    /// Readable | Writeable
294    ///
295    ///
296    /// #### `phase2-ca-cert`
297    ///  Contains the "phase 2" CA certificate if used by the EAP method specified
298    /// in the #NMSetting8021x:phase2-auth or #NMSetting8021x:phase2-autheap
299    /// properties.
300    ///
301    /// Certificate data is specified using a "scheme"; three are currently
302    /// supported: blob, path and pkcs#11 URL. When using the blob scheme this property
303    /// should be set to the certificate's DER encoded data. When using the path
304    /// scheme, this property should be set to the full UTF-8 encoded path of the
305    /// certificate, prefixed with the string "file://" and ending with a terminating
306    /// NUL byte.
307    /// This property can be unset even if the EAP method supports CA certificates,
308    /// but this allows man-in-the-middle attacks and is NOT recommended.
309    ///
310    /// Note that enabling NMSetting8021x:system-ca-certs will override this
311    /// setting to use the built-in path, if the built-in path is not a directory.
312    ///
313    /// Setting this property directly is discouraged; use the
314    /// nm_setting_802_1x_set_phase2_ca_cert() function instead.
315    ///
316    /// Readable | Writeable
317    ///
318    ///
319    /// #### `phase2-ca-cert-password`
320    ///  The password used to access the "phase2" CA certificate stored in
321    /// #NMSetting8021x:phase2-ca-cert property. Only makes sense if the certificate
322    /// is stored on a PKCS#<!-- -->11 token that requires a login.
323    ///
324    /// Readable | Writeable
325    ///
326    ///
327    /// #### `phase2-ca-cert-password-flags`
328    ///  Flags indicating how to handle the #NMSetting8021x:phase2-ca-cert-password property.
329    ///
330    /// Readable | Writeable
331    ///
332    ///
333    /// #### `phase2-ca-path`
334    ///  UTF-8 encoded path to a directory containing PEM or DER formatted
335    /// certificates to be added to the verification chain in addition to the
336    /// certificate specified in the #NMSetting8021x:phase2-ca-cert property.
337    ///
338    /// If NMSetting8021x:system-ca-certs is enabled and the built-in CA
339    /// path is an existing directory, then this setting is ignored.
340    ///
341    /// Readable | Writeable
342    ///
343    ///
344    /// #### `phase2-client-cert`
345    ///  Contains the "phase 2" client certificate if used by the EAP method
346    /// specified in the #NMSetting8021x:phase2-auth or
347    /// #NMSetting8021x:phase2-autheap properties.
348    ///
349    /// Certificate data is specified using a "scheme"; two are currently
350    /// supported: blob and path. When using the blob scheme (which is backwards
351    /// compatible with NM 0.7.x) this property should be set to the
352    /// certificate's DER encoded data. When using the path scheme, this property
353    /// should be set to the full UTF-8 encoded path of the certificate, prefixed
354    /// with the string "file://" and ending with a terminating NUL byte. This
355    /// property can be unset even if the EAP method supports CA certificates,
356    /// but this allows man-in-the-middle attacks and is NOT recommended.
357    ///
358    /// Setting this property directly is discouraged; use the
359    /// nm_setting_802_1x_set_phase2_client_cert() function instead.
360    ///
361    /// Readable | Writeable
362    ///
363    ///
364    /// #### `phase2-client-cert-password`
365    ///  The password used to access the "phase2" client certificate stored in
366    /// #NMSetting8021x:phase2-client-cert property. Only makes sense if the certificate
367    /// is stored on a PKCS#<!-- -->11 token that requires a login.
368    ///
369    /// Readable | Writeable
370    ///
371    ///
372    /// #### `phase2-client-cert-password-flags`
373    ///  Flags indicating how to handle the #NMSetting8021x:phase2-client-cert-password property.
374    ///
375    /// Readable | Writeable
376    ///
377    ///
378    /// #### `phase2-domain-match`
379    ///  Constraint for server domain name. If set, this list of FQDNs is used as
380    /// a match requirement for dNSName element(s) of the certificate presented
381    /// by the authentication server during the inner "phase 2" authentication.
382    /// If a matching dNSName is found, this constraint is met.  If no dNSName
383    /// values are present, this constraint is matched against SubjectName CN
384    /// using the same comparison.
385    /// Multiple valid FQDNs can be passed as a ";" delimited list.
386    ///
387    /// Readable | Writeable
388    ///
389    ///
390    /// #### `phase2-domain-suffix-match`
391    ///  Constraint for server domain name. If set, this FQDN is used as a suffix
392    /// match requirement for dNSName element(s) of the certificate presented by
393    /// the authentication server during the inner "phase 2" authentication.  If
394    /// a matching dNSName is found, this constraint is met.  If no dNSName
395    /// values are present, this constraint is matched against SubjectName CN
396    /// using same suffix match comparison.
397    /// Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited
398    /// list.
399    ///
400    /// Readable | Writeable
401    ///
402    ///
403    /// #### `phase2-private-key`
404    ///  Contains the "phase 2" inner private key when the
405    /// #NMSetting8021x:phase2-auth or #NMSetting8021x:phase2-autheap property is
406    /// set to "tls".
407    ///
408    /// Key data is specified using a "scheme"; two are currently supported: blob
409    /// and path. When using the blob scheme and private keys, this property
410    /// should be set to the key's encrypted PEM encoded data. When using private
411    /// keys with the path scheme, this property should be set to the full UTF-8
412    /// encoded path of the key, prefixed with the string "file://" and ending
413    /// with a terminating NUL byte. When using PKCS#<!-- -->12 format private
414    /// keys and the blob scheme, this property should be set to the
415    /// PKCS#<!-- -->12 data and the #NMSetting8021x:phase2-private-key-password
416    /// property must be set to password used to decrypt the PKCS#<!-- -->12
417    /// certificate and key. When using PKCS#<!-- -->12 files and the path
418    /// scheme, this property should be set to the full UTF-8 encoded path of the
419    /// key, prefixed with the string "file://" and ending with a terminating
420    /// NUL byte, and as with the blob scheme the
421    /// #NMSetting8021x:phase2-private-key-password property must be set to the
422    /// password used to decode the PKCS#<!-- -->12 private key and certificate.
423    ///
424    /// Setting this property directly is discouraged; use the
425    /// nm_setting_802_1x_set_phase2_private_key() function instead.
426    ///
427    /// Readable | Writeable
428    ///
429    ///
430    /// #### `phase2-private-key-password`
431    ///  The password used to decrypt the "phase 2" private key specified in the
432    /// #NMSetting8021x:phase2-private-key property when the private key either
433    /// uses the path scheme, or is a PKCS#<!-- -->12 format key.  Setting this
434    /// property directly is not generally necessary except when returning
435    /// secrets to NetworkManager; it is generally set automatically when setting
436    /// the private key by the nm_setting_802_1x_set_phase2_private_key()
437    /// function.
438    ///
439    /// Readable | Writeable
440    ///
441    ///
442    /// #### `phase2-private-key-password-flags`
443    ///  Flags indicating how to handle the
444    /// #NMSetting8021x:phase2-private-key-password property.
445    ///
446    /// Readable | Writeable
447    ///
448    ///
449    /// #### `phase2-subject-match`
450    ///  Substring to be matched against the subject of the certificate presented
451    /// by the authentication server during the inner "phase 2"
452    /// authentication. When unset, no verification of the authentication server
453    /// certificate's subject is performed. This property provides little security,
454    /// if any, and should not be used.
455    ///
456    /// Readable | Writeable
457    ///
458    ///
459    /// #### `pin`
460    ///  PIN used for EAP authentication methods.
461    ///
462    /// Readable | Writeable
463    ///
464    ///
465    /// #### `pin-flags`
466    ///  Flags indicating how to handle the #NMSetting8021x:pin property.
467    ///
468    /// Readable | Writeable
469    ///
470    ///
471    /// #### `private-key`
472    ///  Contains the private key when the #NMSetting8021x:eap property is set to
473    /// "tls".
474    ///
475    /// Key data is specified using a "scheme"; two are currently supported: blob
476    /// and path. When using the blob scheme and private keys, this property
477    /// should be set to the key's encrypted PEM encoded data. When using private
478    /// keys with the path scheme, this property should be set to the full UTF-8
479    /// encoded path of the key, prefixed with the string "file://" and ending
480    /// with a terminating NUL byte. When using PKCS#<!-- -->12 format private
481    /// keys and the blob scheme, this property should be set to the
482    /// PKCS#<!-- -->12 data and the #NMSetting8021x:private-key-password
483    /// property must be set to password used to decrypt the PKCS#<!-- -->12
484    /// certificate and key. When using PKCS#<!-- -->12 files and the path
485    /// scheme, this property should be set to the full UTF-8 encoded path of the
486    /// key, prefixed with the string "file://" and ending with a terminating
487    /// NUL byte, and as with the blob scheme the "private-key-password" property
488    /// must be set to the password used to decode the PKCS#<!-- -->12 private
489    /// key and certificate.
490    ///
491    /// Setting this property directly is discouraged; use the
492    /// nm_setting_802_1x_set_private_key() function instead.
493    ///
494    /// WARNING: #NMSetting8021x:private-key is not a "secret" property, and thus
495    /// unencrypted private key data using the BLOB scheme may be readable by
496    /// unprivileged users.  Private keys should always be encrypted with a
497    /// private key password to prevent unauthorized access to unencrypted
498    /// private key data.
499    ///
500    /// Readable | Writeable
501    ///
502    ///
503    /// #### `private-key-password`
504    ///  The password used to decrypt the private key specified in the
505    /// #NMSetting8021x:private-key property when the private key either uses the
506    /// path scheme, or if the private key is a PKCS#<!-- -->12 format key.  Setting this
507    /// property directly is not generally necessary except when returning
508    /// secrets to NetworkManager; it is generally set automatically when setting
509    /// the private key by the nm_setting_802_1x_set_private_key() function.
510    ///
511    /// Readable | Writeable
512    ///
513    ///
514    /// #### `private-key-password-flags`
515    ///  Flags indicating how to handle the #NMSetting8021x:private-key-password
516    /// property.
517    ///
518    /// Readable | Writeable
519    ///
520    ///
521    /// #### `subject-match`
522    ///  Substring to be matched against the subject of the certificate presented
523    /// by the authentication server. When unset, no verification of the
524    /// authentication server certificate's subject is performed. This property
525    /// provides little security, if any, and should not be used.
526    ///
527    /// Readable | Writeable
528    ///
529    ///
530    /// #### `system-ca-certs`
531    ///  When [`true`], overrides the #NMSetting8021x:ca-path and
532    /// #NMSetting8021x:phase2-ca-path properties using the system CA directory
533    /// specified at configure time with the --system-ca-path switch.  The
534    /// certificates in this directory are added to the verification chain in
535    /// addition to any certificates specified by the #NMSetting8021x:ca-cert and
536    /// #NMSetting8021x:phase2-ca-cert properties. If the path provided with
537    /// --system-ca-path is rather a file name (bundle of trusted CA certificates),
538    /// it overrides #NMSetting8021x:ca-cert and #NMSetting8021x:phase2-ca-cert
539    /// properties instead (sets ca_cert/ca_cert2 options for wpa_supplicant).
540    ///
541    /// Readable | Writeable
542    /// <details><summary><h4>Setting</h4></summary>
543    ///
544    ///
545    /// #### `name`
546    ///  The setting's name, which uniquely identifies the setting within the
547    /// connection.  Each setting type has a name unique to that type, for
548    /// example "ppp" or "802-11-wireless" or "802-3-ethernet".
549    ///
550    /// Readable
551    /// </details>
552    ///
553    /// # Implements
554    ///
555    /// [`SettingExt`][trait@crate::prelude::SettingExt]
556    #[doc(alias = "NMSetting8021x")]
557    pub struct Setting8021x(Object<ffi::NMSetting8021x, ffi::NMSetting8021xClass>) @extends Setting;
558
559    match fn {
560        type_ => || ffi::nm_setting_802_1x_get_type(),
561    }
562}
563
564impl Setting8021x {
565    /// Creates a new #NMSetting8021x object with default values.
566    ///
567    /// # Returns
568    ///
569    /// the new empty #NMSetting8021x object
570    #[doc(alias = "nm_setting_802_1x_new")]
571    pub fn new() -> Setting8021x {
572        assert_initialized_main_thread!();
573        unsafe { Setting::from_glib_full(ffi::nm_setting_802_1x_new()).unsafe_cast() }
574    }
575
576    // rustdoc-stripper-ignore-next
577    /// Creates a new builder-pattern struct instance to construct [`Setting8021x`] objects.
578    ///
579    /// This method returns an instance of [`Setting8021xBuilder`](crate::builders::Setting8021xBuilder) which can be used to create [`Setting8021x`] objects.
580    pub fn builder() -> Setting8021xBuilder {
581        Setting8021xBuilder::new()
582    }
583
584    /// Adds an allowed alternate subject name match.  Until at least one
585    /// match is added, the altSubjectName of the remote authentication
586    /// server is not verified.
587    /// ## `altsubject_match`
588    /// the altSubjectName to allow for this connection
589    ///
590    /// # Returns
591    ///
592    /// [`true`] if the alternative subject name match was
593    ///  successfully added, [`false`] if it was already allowed.
594    #[doc(alias = "nm_setting_802_1x_add_altsubject_match")]
595    pub fn add_altsubject_match(&self, altsubject_match: &str) -> bool {
596        unsafe {
597            from_glib(ffi::nm_setting_802_1x_add_altsubject_match(
598                self.to_glib_none().0,
599                altsubject_match.to_glib_none().0,
600            ))
601        }
602    }
603
604    /// Adds an allowed EAP method.  The setting is not valid until at least one
605    /// EAP method has been added.  See #NMSetting8021x:eap property for a list of
606    /// allowed EAP methods.
607    /// ## `eap`
608    /// the name of the EAP method to allow for this connection
609    ///
610    /// # Returns
611    ///
612    /// [`true`] if the EAP method was successfully added, [`false`] if it was
613    ///  not a valid method or if it was already allowed.
614    #[doc(alias = "nm_setting_802_1x_add_eap_method")]
615    pub fn add_eap_method(&self, eap: &str) -> bool {
616        unsafe {
617            from_glib(ffi::nm_setting_802_1x_add_eap_method(
618                self.to_glib_none().0,
619                eap.to_glib_none().0,
620            ))
621        }
622    }
623
624    /// Adds an allowed alternate subject name match for "phase 2".  Until
625    /// at least one match is added, the altSubjectName of the "phase 2"
626    /// remote authentication server is not verified.
627    /// ## `phase2_altsubject_match`
628    /// the "phase 2" altSubjectName to allow for this
629    /// connection
630    ///
631    /// # Returns
632    ///
633    /// [`true`] if the "phase 2" alternative subject name match was
634    ///  successfully added, [`false`] if it was already allowed.
635    #[doc(alias = "nm_setting_802_1x_add_phase2_altsubject_match")]
636    pub fn add_phase2_altsubject_match(&self, phase2_altsubject_match: &str) -> bool {
637        unsafe {
638            from_glib(ffi::nm_setting_802_1x_add_phase2_altsubject_match(
639                self.to_glib_none().0,
640                phase2_altsubject_match.to_glib_none().0,
641            ))
642        }
643    }
644
645    /// Clears all altSubjectName matches.
646    #[doc(alias = "nm_setting_802_1x_clear_altsubject_matches")]
647    pub fn clear_altsubject_matches(&self) {
648        unsafe {
649            ffi::nm_setting_802_1x_clear_altsubject_matches(self.to_glib_none().0);
650        }
651    }
652
653    /// Clears all allowed EAP methods.
654    #[doc(alias = "nm_setting_802_1x_clear_eap_methods")]
655    pub fn clear_eap_methods(&self) {
656        unsafe {
657            ffi::nm_setting_802_1x_clear_eap_methods(self.to_glib_none().0);
658        }
659    }
660
661    /// Clears all "phase 2" altSubjectName matches.
662    #[doc(alias = "nm_setting_802_1x_clear_phase2_altsubject_matches")]
663    pub fn clear_phase2_altsubject_matches(&self) {
664        unsafe {
665            ffi::nm_setting_802_1x_clear_phase2_altsubject_matches(self.to_glib_none().0);
666        }
667    }
668
669    /// Returns the altSubjectName match at index @i.
670    /// ## `i`
671    /// the zero-based index of the array of altSubjectName matches
672    ///
673    /// # Returns
674    ///
675    /// the altSubjectName match at index @i
676    #[doc(alias = "nm_setting_802_1x_get_altsubject_match")]
677    #[doc(alias = "get_altsubject_match")]
678    pub fn altsubject_match(&self, i: u32) -> glib::GString {
679        unsafe {
680            from_glib_none(ffi::nm_setting_802_1x_get_altsubject_match(
681                self.to_glib_none().0,
682                i,
683            ))
684        }
685    }
686
687    /// Returns the anonymous identifier used by some EAP methods (like TTLS) to
688    /// authenticate the user in the outer unencrypted "phase 1" authentication.  The
689    /// inner "phase 2" authentication will use the #NMSetting8021x:identity in
690    /// a secure form, if applicable for that EAP method.
691    ///
692    /// # Returns
693    ///
694    /// the anonymous identifier
695    #[doc(alias = "nm_setting_802_1x_get_anonymous_identity")]
696    #[doc(alias = "get_anonymous_identity")]
697    #[doc(alias = "anonymous-identity")]
698    pub fn anonymous_identity(&self) -> glib::GString {
699        unsafe {
700            from_glib_none(ffi::nm_setting_802_1x_get_anonymous_identity(
701                self.to_glib_none().0,
702            ))
703        }
704    }
705
706    /// Returns the value contained in the #NMSetting8021x:auth-timeout property.
707    ///
708    /// # Returns
709    ///
710    /// the configured authentication timeout in seconds. Zero means the
711    /// global default value.
712    #[cfg(feature = "v1_8")]
713    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
714    #[doc(alias = "nm_setting_802_1x_get_auth_timeout")]
715    #[doc(alias = "get_auth_timeout")]
716    #[doc(alias = "auth-timeout")]
717    pub fn auth_timeout(&self) -> i32 {
718        unsafe { ffi::nm_setting_802_1x_get_auth_timeout(self.to_glib_none().0) }
719    }
720
721    //#[doc(alias = "nm_setting_802_1x_get_ca_cert_blob")]
722    //#[doc(alias = "get_ca_cert_blob")]
723    //pub fn ca_cert_blob(&self) -> /*Ignored*/glib::Bytes {
724    //    unsafe { TODO: call ffi:nm_setting_802_1x_get_ca_cert_blob() }
725    //}
726
727    ///
728    /// # Returns
729    ///
730    /// the password used to access the CA certificate stored in
731    /// #NMSetting8021x:ca-cert property. Only makes sense if the certificate
732    /// is stored on a PKCS#<!-- -->11 token that requires a login.
733    #[cfg(feature = "v1_8")]
734    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
735    #[doc(alias = "nm_setting_802_1x_get_ca_cert_password")]
736    #[doc(alias = "get_ca_cert_password")]
737    #[doc(alias = "ca-cert-password")]
738    pub fn ca_cert_password(&self) -> glib::GString {
739        unsafe {
740            from_glib_none(ffi::nm_setting_802_1x_get_ca_cert_password(
741                self.to_glib_none().0,
742            ))
743        }
744    }
745
746    ///
747    /// # Returns
748    ///
749    /// the #NMSettingSecretFlags pertaining to the
750    /// #NMSetting8021x:ca-cert-password
751    #[cfg(feature = "v1_8")]
752    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
753    #[doc(alias = "nm_setting_802_1x_get_ca_cert_password_flags")]
754    #[doc(alias = "get_ca_cert_password_flags")]
755    #[doc(alias = "ca-cert-password-flags")]
756    pub fn ca_cert_password_flags(&self) -> SettingSecretFlags {
757        unsafe {
758            from_glib(ffi::nm_setting_802_1x_get_ca_cert_password_flags(
759                self.to_glib_none().0,
760            ))
761        }
762    }
763
764    /// Returns the CA certificate path if the CA certificate is stored using the
765    /// [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] scheme.  Not all EAP methods use a
766    /// CA certificate (LEAP for example), and those that can take advantage of the
767    /// CA certificate allow it to be unset.  Note that lack of a CA certificate
768    /// reduces security by allowing man-in-the-middle attacks, because the identity
769    /// of the network cannot be confirmed by the client.
770    ///
771    /// # Returns
772    ///
773    /// path to the CA certificate file
774    #[doc(alias = "nm_setting_802_1x_get_ca_cert_path")]
775    #[doc(alias = "get_ca_cert_path")]
776    pub fn ca_cert_path(&self) -> glib::GString {
777        unsafe {
778            from_glib_none(ffi::nm_setting_802_1x_get_ca_cert_path(
779                self.to_glib_none().0,
780            ))
781        }
782    }
783
784    /// Returns the scheme used to store the CA certificate.  If the returned scheme
785    /// is [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], use nm_setting_802_1x_get_ca_cert_blob();
786    /// if [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path], use nm_setting_802_1x_get_ca_cert_path();
787    /// if [`Setting8021xCKScheme::Pkcs11`][crate::Setting8021xCKScheme::Pkcs11], use nm_setting_802_1x_get_ca_cert_uri().
788    ///
789    /// # Returns
790    ///
791    /// scheme used to store the CA certificate (blob or path)
792    #[doc(alias = "nm_setting_802_1x_get_ca_cert_scheme")]
793    #[doc(alias = "get_ca_cert_scheme")]
794    pub fn ca_cert_scheme(&self) -> Setting8021xCKScheme {
795        unsafe {
796            from_glib(ffi::nm_setting_802_1x_get_ca_cert_scheme(
797                self.to_glib_none().0,
798            ))
799        }
800    }
801
802    /// Returns the CA certificate URI analogously to
803    /// nm_setting_802_1x_get_ca_cert_blob() and
804    /// nm_setting_802_1x_get_ca_cert_path().
805    ///
806    /// Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC
807    /// 7512), but may be extended to other schemes in future (such as 'file' URIs
808    /// for local files and 'data' URIs for inline certificate data).
809    ///
810    /// # Returns
811    ///
812    /// the URI string
813    #[cfg(feature = "v1_6")]
814    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
815    #[doc(alias = "nm_setting_802_1x_get_ca_cert_uri")]
816    #[doc(alias = "get_ca_cert_uri")]
817    pub fn ca_cert_uri(&self) -> glib::GString {
818        unsafe {
819            from_glib_none(ffi::nm_setting_802_1x_get_ca_cert_uri(
820                self.to_glib_none().0,
821            ))
822        }
823    }
824
825    /// Returns the path of the CA certificate directory if previously set.  Systems
826    /// will often have a directory that contains multiple individual CA certificates
827    /// which the supplicant can then add to the verification chain.  This may be
828    /// used in addition to the #NMSetting8021x:ca-cert property to add more CA
829    /// certificates for verifying the network to client.
830    ///
831    /// # Returns
832    ///
833    /// the CA certificate directory path
834    #[doc(alias = "nm_setting_802_1x_get_ca_path")]
835    #[doc(alias = "get_ca_path")]
836    #[doc(alias = "ca-path")]
837    pub fn ca_path(&self) -> glib::GString {
838        unsafe { from_glib_none(ffi::nm_setting_802_1x_get_ca_path(self.to_glib_none().0)) }
839    }
840
841    //#[doc(alias = "nm_setting_802_1x_get_client_cert_blob")]
842    //#[doc(alias = "get_client_cert_blob")]
843    //pub fn client_cert_blob(&self) -> /*Ignored*/glib::Bytes {
844    //    unsafe { TODO: call ffi:nm_setting_802_1x_get_client_cert_blob() }
845    //}
846
847    ///
848    /// # Returns
849    ///
850    /// the password used to access the client certificate stored in
851    /// #NMSetting8021x:client-cert property. Only makes sense if the certificate
852    /// is stored on a PKCS#<!-- -->11 token that requires a login.
853    #[cfg(feature = "v1_8")]
854    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
855    #[doc(alias = "nm_setting_802_1x_get_client_cert_password")]
856    #[doc(alias = "get_client_cert_password")]
857    #[doc(alias = "client-cert-password")]
858    pub fn client_cert_password(&self) -> glib::GString {
859        unsafe {
860            from_glib_none(ffi::nm_setting_802_1x_get_client_cert_password(
861                self.to_glib_none().0,
862            ))
863        }
864    }
865
866    ///
867    /// # Returns
868    ///
869    /// the #NMSettingSecretFlags pertaining to the
870    /// #NMSetting8021x:client-cert-password
871    #[cfg(feature = "v1_8")]
872    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
873    #[doc(alias = "nm_setting_802_1x_get_client_cert_password_flags")]
874    #[doc(alias = "get_client_cert_password_flags")]
875    #[doc(alias = "client-cert-password-flags")]
876    pub fn client_cert_password_flags(&self) -> SettingSecretFlags {
877        unsafe {
878            from_glib(ffi::nm_setting_802_1x_get_client_cert_password_flags(
879                self.to_glib_none().0,
880            ))
881        }
882    }
883
884    /// Client certificates are used to identify the connecting client to the network
885    /// when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
886    /// authentication method.
887    ///
888    /// # Returns
889    ///
890    /// path to the client certificate file
891    #[doc(alias = "nm_setting_802_1x_get_client_cert_path")]
892    #[doc(alias = "get_client_cert_path")]
893    pub fn client_cert_path(&self) -> glib::GString {
894        unsafe {
895            from_glib_none(ffi::nm_setting_802_1x_get_client_cert_path(
896                self.to_glib_none().0,
897            ))
898        }
899    }
900
901    /// Returns the scheme used to store the client certificate.  If the returned scheme
902    /// is [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], use nm_setting_802_1x_get_client_cert_blob();
903    /// if [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path], use nm_setting_802_1x_get_client_cert_path();
904    /// if [`Setting8021xCKScheme::Pkcs11`][crate::Setting8021xCKScheme::Pkcs11], use nm_setting_802_1x_get_client_cert_uri().
905    ///
906    /// # Returns
907    ///
908    /// scheme used to store the client certificate (blob or path)
909    #[doc(alias = "nm_setting_802_1x_get_client_cert_scheme")]
910    #[doc(alias = "get_client_cert_scheme")]
911    pub fn client_cert_scheme(&self) -> Setting8021xCKScheme {
912        unsafe {
913            from_glib(ffi::nm_setting_802_1x_get_client_cert_scheme(
914                self.to_glib_none().0,
915            ))
916        }
917    }
918
919    /// Returns the client certificate URI analogously to
920    /// nm_setting_802_1x_get_client_cert_blob() and
921    /// nm_setting_802_1x_get_client_cert_path().
922    ///
923    /// Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC
924    /// 7512), but may be extended to other schemes in future (such as 'file' URIs
925    /// for local files and 'data' URIs for inline certificate data).
926    ///
927    /// # Returns
928    ///
929    /// the URI string
930    #[cfg(feature = "v1_6")]
931    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
932    #[doc(alias = "nm_setting_802_1x_get_client_cert_uri")]
933    #[doc(alias = "get_client_cert_uri")]
934    pub fn client_cert_uri(&self) -> glib::GString {
935        unsafe {
936            from_glib_none(ffi::nm_setting_802_1x_get_client_cert_uri(
937                self.to_glib_none().0,
938            ))
939        }
940    }
941
942    ///
943    /// # Returns
944    ///
945    /// the #NMSetting8021x:domain-match property.
946    #[cfg(feature = "v1_24")]
947    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
948    #[doc(alias = "nm_setting_802_1x_get_domain_match")]
949    #[doc(alias = "get_domain_match")]
950    #[doc(alias = "domain-match")]
951    pub fn domain_match(&self) -> glib::GString {
952        unsafe {
953            from_glib_none(ffi::nm_setting_802_1x_get_domain_match(
954                self.to_glib_none().0,
955            ))
956        }
957    }
958
959    ///
960    /// # Returns
961    ///
962    /// the #NMSetting8021x:domain-suffix-match property.
963    #[cfg(feature = "v1_2")]
964    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
965    #[doc(alias = "nm_setting_802_1x_get_domain_suffix_match")]
966    #[doc(alias = "get_domain_suffix_match")]
967    #[doc(alias = "domain-suffix-match")]
968    pub fn domain_suffix_match(&self) -> glib::GString {
969        unsafe {
970            from_glib_none(ffi::nm_setting_802_1x_get_domain_suffix_match(
971                self.to_glib_none().0,
972            ))
973        }
974    }
975
976    /// Returns the name of the allowed EAP method at index @i.
977    /// ## `i`
978    /// the index of the EAP method name to return
979    ///
980    /// # Returns
981    ///
982    /// the name of the allowed EAP method at index @i
983    #[doc(alias = "nm_setting_802_1x_get_eap_method")]
984    #[doc(alias = "get_eap_method")]
985    pub fn eap_method(&self, i: u32) -> glib::GString {
986        unsafe {
987            from_glib_none(ffi::nm_setting_802_1x_get_eap_method(
988                self.to_glib_none().0,
989                i,
990            ))
991        }
992    }
993
994    /// Returns the identifier used by some EAP methods (like TLS) to
995    /// authenticate the user.  Often this is a username or login name.
996    ///
997    /// # Returns
998    ///
999    /// the user identifier
1000    #[doc(alias = "nm_setting_802_1x_get_identity")]
1001    #[doc(alias = "get_identity")]
1002    pub fn identity(&self) -> glib::GString {
1003        unsafe { from_glib_none(ffi::nm_setting_802_1x_get_identity(self.to_glib_none().0)) }
1004    }
1005
1006    /// Returns the number of entries in the
1007    /// #NMSetting8021x:altsubject-matches property of this setting.
1008    ///
1009    /// # Returns
1010    ///
1011    /// the number of altsubject-matches entries.
1012    #[doc(alias = "nm_setting_802_1x_get_num_altsubject_matches")]
1013    #[doc(alias = "get_num_altsubject_matches")]
1014    pub fn num_altsubject_matches(&self) -> u32 {
1015        unsafe { ffi::nm_setting_802_1x_get_num_altsubject_matches(self.to_glib_none().0) }
1016    }
1017
1018    /// Returns the number of eap methods allowed for use when connecting to the
1019    /// network.  Generally only one EAP method is used.  Use the functions
1020    /// nm_setting_802_1x_get_eap_method(), nm_setting_802_1x_add_eap_method(),
1021    /// and nm_setting_802_1x_remove_eap_method() for adding, removing, and retrieving
1022    /// allowed EAP methods.
1023    ///
1024    /// # Returns
1025    ///
1026    /// the number of allowed EAP methods
1027    #[doc(alias = "nm_setting_802_1x_get_num_eap_methods")]
1028    #[doc(alias = "get_num_eap_methods")]
1029    pub fn num_eap_methods(&self) -> u32 {
1030        unsafe { ffi::nm_setting_802_1x_get_num_eap_methods(self.to_glib_none().0) }
1031    }
1032
1033    /// Returns the number of entries in the
1034    /// #NMSetting8021x:phase2-altsubject-matches property of this setting.
1035    ///
1036    /// # Returns
1037    ///
1038    /// the number of phase2-altsubject-matches entries.
1039    #[doc(alias = "nm_setting_802_1x_get_num_phase2_altsubject_matches")]
1040    #[doc(alias = "get_num_phase2_altsubject_matches")]
1041    pub fn num_phase2_altsubject_matches(&self) -> u32 {
1042        unsafe { ffi::nm_setting_802_1x_get_num_phase2_altsubject_matches(self.to_glib_none().0) }
1043    }
1044
1045    /// Returns the openssl_ciphers configuration for wpa_supplicant.
1046    ///
1047    /// # Returns
1048    ///
1049    /// cipher string for tls setup in wpa_supplicant.
1050    #[cfg(feature = "v1_48")]
1051    #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
1052    #[doc(alias = "nm_setting_802_1x_get_openssl_ciphers")]
1053    #[doc(alias = "get_openssl_ciphers")]
1054    #[doc(alias = "openssl-ciphers")]
1055    pub fn openssl_ciphers(&self) -> glib::GString {
1056        unsafe {
1057            from_glib_none(ffi::nm_setting_802_1x_get_openssl_ciphers(
1058                self.to_glib_none().0,
1059            ))
1060        }
1061    }
1062
1063    /// Returns the value contained in the #NMSetting8021x:optional property.
1064    ///
1065    /// # Returns
1066    ///
1067    /// [`true`] if the activation should proceed even when the 802.1X
1068    ///     authentication fails; [`false`] otherwise
1069    #[cfg(feature = "v1_22")]
1070    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1071    #[doc(alias = "nm_setting_802_1x_get_optional")]
1072    #[doc(alias = "get_optional")]
1073    #[doc(alias = "optional")]
1074    pub fn is_optional(&self) -> bool {
1075        unsafe { from_glib(ffi::nm_setting_802_1x_get_optional(self.to_glib_none().0)) }
1076    }
1077
1078    /// Returns the file containing PAC credentials used by EAP-FAST method.
1079    ///
1080    /// # Returns
1081    ///
1082    /// the PAC file
1083    #[doc(alias = "nm_setting_802_1x_get_pac_file")]
1084    #[doc(alias = "get_pac_file")]
1085    #[doc(alias = "pac-file")]
1086    pub fn pac_file(&self) -> glib::GString {
1087        unsafe { from_glib_none(ffi::nm_setting_802_1x_get_pac_file(self.to_glib_none().0)) }
1088    }
1089
1090    ///
1091    /// # Returns
1092    ///
1093    /// the password used by the authentication method, if any, as specified
1094    ///   by the #NMSetting8021x:password property
1095    #[doc(alias = "nm_setting_802_1x_get_password")]
1096    #[doc(alias = "get_password")]
1097    pub fn password(&self) -> glib::GString {
1098        unsafe { from_glib_none(ffi::nm_setting_802_1x_get_password(self.to_glib_none().0)) }
1099    }
1100
1101    ///
1102    /// # Returns
1103    ///
1104    /// the #NMSettingSecretFlags pertaining to the #NMSetting8021x:password
1105    #[doc(alias = "nm_setting_802_1x_get_password_flags")]
1106    #[doc(alias = "get_password_flags")]
1107    #[doc(alias = "password-flags")]
1108    pub fn password_flags(&self) -> SettingSecretFlags {
1109        unsafe {
1110            from_glib(ffi::nm_setting_802_1x_get_password_flags(
1111                self.to_glib_none().0,
1112            ))
1113        }
1114    }
1115
1116    //#[doc(alias = "nm_setting_802_1x_get_password_raw")]
1117    //#[doc(alias = "get_password_raw")]
1118    //#[doc(alias = "password-raw")]
1119    //pub fn password_raw(&self) -> /*Ignored*/glib::Bytes {
1120    //    unsafe { TODO: call ffi:nm_setting_802_1x_get_password_raw() }
1121    //}
1122
1123    ///
1124    /// # Returns
1125    ///
1126    /// the #NMSettingSecretFlags pertaining to the
1127    ///   #NMSetting8021x:password-raw
1128    #[doc(alias = "nm_setting_802_1x_get_password_raw_flags")]
1129    #[doc(alias = "get_password_raw_flags")]
1130    #[doc(alias = "password-raw-flags")]
1131    pub fn password_raw_flags(&self) -> SettingSecretFlags {
1132        unsafe {
1133            from_glib(ffi::nm_setting_802_1x_get_password_raw_flags(
1134                self.to_glib_none().0,
1135            ))
1136        }
1137    }
1138
1139    ///
1140    /// # Returns
1141    ///
1142    /// the authentication flags for "phase 1".
1143    #[cfg(feature = "v1_8")]
1144    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
1145    #[doc(alias = "nm_setting_802_1x_get_phase1_auth_flags")]
1146    #[doc(alias = "get_phase1_auth_flags")]
1147    #[doc(alias = "phase1-auth-flags")]
1148    pub fn phase1_auth_flags(&self) -> Setting8021xAuthFlags {
1149        unsafe {
1150            from_glib(ffi::nm_setting_802_1x_get_phase1_auth_flags(
1151                self.to_glib_none().0,
1152            ))
1153        }
1154    }
1155
1156    ///
1157    /// # Returns
1158    ///
1159    /// whether "phase 1" PEAP fast provisioning should be used, as specified
1160    ///  by the #NMSetting8021x:phase1-fast-provisioning property.  See the
1161    ///  wpa_supplicant documentation for more details.
1162    #[doc(alias = "nm_setting_802_1x_get_phase1_fast_provisioning")]
1163    #[doc(alias = "get_phase1_fast_provisioning")]
1164    #[doc(alias = "phase1-fast-provisioning")]
1165    pub fn phase1_fast_provisioning(&self) -> glib::GString {
1166        unsafe {
1167            from_glib_none(ffi::nm_setting_802_1x_get_phase1_fast_provisioning(
1168                self.to_glib_none().0,
1169            ))
1170        }
1171    }
1172
1173    ///
1174    /// # Returns
1175    ///
1176    /// whether the "phase 1" PEAP label is new-style or old-style, to be
1177    ///  used when authenticating with EAP-PEAP, as contained in the
1178    ///  #NMSetting8021x:phase1-peaplabel property.  Valid values are [`None`] (unset),
1179    ///  "0" (use old-style label), and "1" (use new-style label).  See the
1180    ///  wpa_supplicant documentation for more details.
1181    #[doc(alias = "nm_setting_802_1x_get_phase1_peaplabel")]
1182    #[doc(alias = "get_phase1_peaplabel")]
1183    #[doc(alias = "phase1-peaplabel")]
1184    pub fn phase1_peaplabel(&self) -> glib::GString {
1185        unsafe {
1186            from_glib_none(ffi::nm_setting_802_1x_get_phase1_peaplabel(
1187                self.to_glib_none().0,
1188            ))
1189        }
1190    }
1191
1192    ///
1193    /// # Returns
1194    ///
1195    /// the "phase 1" PEAP version to be used when authenticating with
1196    ///  EAP-PEAP as contained in the #NMSetting8021x:phase1-peapver property.  Valid
1197    ///  values are [`None`] (unset), "0" (PEAP version 0), and "1" (PEAP version 1).
1198    #[doc(alias = "nm_setting_802_1x_get_phase1_peapver")]
1199    #[doc(alias = "get_phase1_peapver")]
1200    #[doc(alias = "phase1-peapver")]
1201    pub fn phase1_peapver(&self) -> glib::GString {
1202        unsafe {
1203            from_glib_none(ffi::nm_setting_802_1x_get_phase1_peapver(
1204                self.to_glib_none().0,
1205            ))
1206        }
1207    }
1208
1209    /// Returns the "phase 2" altSubjectName match at index @i.
1210    /// ## `i`
1211    /// the zero-based index of the array of "phase 2" altSubjectName matches
1212    ///
1213    /// # Returns
1214    ///
1215    /// the "phase 2" altSubjectName match at index @i
1216    #[doc(alias = "nm_setting_802_1x_get_phase2_altsubject_match")]
1217    #[doc(alias = "get_phase2_altsubject_match")]
1218    pub fn phase2_altsubject_match(&self, i: u32) -> glib::GString {
1219        unsafe {
1220            from_glib_none(ffi::nm_setting_802_1x_get_phase2_altsubject_match(
1221                self.to_glib_none().0,
1222                i,
1223            ))
1224        }
1225    }
1226
1227    ///
1228    /// # Returns
1229    ///
1230    /// the "phase 2" non-EAP (ex MD5) allowed authentication method as
1231    ///   specified by the #NMSetting8021x:phase2-auth property.
1232    #[doc(alias = "nm_setting_802_1x_get_phase2_auth")]
1233    #[doc(alias = "get_phase2_auth")]
1234    #[doc(alias = "phase2-auth")]
1235    pub fn phase2_auth(&self) -> glib::GString {
1236        unsafe {
1237            from_glib_none(ffi::nm_setting_802_1x_get_phase2_auth(
1238                self.to_glib_none().0,
1239            ))
1240        }
1241    }
1242
1243    ///
1244    /// # Returns
1245    ///
1246    /// the "phase 2" EAP-based (ex TLS) allowed authentication method as
1247    ///   specified by the #NMSetting8021x:phase2-autheap property.
1248    #[doc(alias = "nm_setting_802_1x_get_phase2_autheap")]
1249    #[doc(alias = "get_phase2_autheap")]
1250    #[doc(alias = "phase2-autheap")]
1251    pub fn phase2_autheap(&self) -> glib::GString {
1252        unsafe {
1253            from_glib_none(ffi::nm_setting_802_1x_get_phase2_autheap(
1254                self.to_glib_none().0,
1255            ))
1256        }
1257    }
1258
1259    //#[doc(alias = "nm_setting_802_1x_get_phase2_ca_cert_blob")]
1260    //#[doc(alias = "get_phase2_ca_cert_blob")]
1261    //pub fn phase2_ca_cert_blob(&self) -> /*Ignored*/glib::Bytes {
1262    //    unsafe { TODO: call ffi:nm_setting_802_1x_get_phase2_ca_cert_blob() }
1263    //}
1264
1265    ///
1266    /// # Returns
1267    ///
1268    /// the password used to access the "phase2" CA certificate stored in
1269    /// #NMSetting8021x:phase2-ca-cert property. Only makes sense if the certificate
1270    /// is stored on a PKCS#<!-- -->11 token that requires a login.
1271    #[cfg(feature = "v1_8")]
1272    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
1273    #[doc(alias = "nm_setting_802_1x_get_phase2_ca_cert_password")]
1274    #[doc(alias = "get_phase2_ca_cert_password")]
1275    #[doc(alias = "phase2-ca-cert-password")]
1276    pub fn phase2_ca_cert_password(&self) -> glib::GString {
1277        unsafe {
1278            from_glib_none(ffi::nm_setting_802_1x_get_phase2_ca_cert_password(
1279                self.to_glib_none().0,
1280            ))
1281        }
1282    }
1283
1284    ///
1285    /// # Returns
1286    ///
1287    /// the #NMSettingSecretFlags pertaining to the
1288    /// #NMSetting8021x:phase2-private-key-password
1289    #[cfg(feature = "v1_8")]
1290    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
1291    #[doc(alias = "nm_setting_802_1x_get_phase2_ca_cert_password_flags")]
1292    #[doc(alias = "get_phase2_ca_cert_password_flags")]
1293    #[doc(alias = "phase2-ca-cert-password-flags")]
1294    pub fn phase2_ca_cert_password_flags(&self) -> SettingSecretFlags {
1295        unsafe {
1296            from_glib(ffi::nm_setting_802_1x_get_phase2_ca_cert_password_flags(
1297                self.to_glib_none().0,
1298            ))
1299        }
1300    }
1301
1302    /// Returns the "phase 2" CA certificate path if the CA certificate is stored
1303    /// using the [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] scheme.  Not all EAP methods use
1304    /// a CA certificate (LEAP for example), and those that can take advantage of the
1305    /// CA certificate allow it to be unset.  Note that lack of a CA certificate
1306    /// reduces security by allowing man-in-the-middle attacks, because the identity
1307    /// of the network cannot be confirmed by the client.
1308    ///
1309    /// # Returns
1310    ///
1311    /// path to the "phase 2" CA certificate file
1312    #[doc(alias = "nm_setting_802_1x_get_phase2_ca_cert_path")]
1313    #[doc(alias = "get_phase2_ca_cert_path")]
1314    pub fn phase2_ca_cert_path(&self) -> glib::GString {
1315        unsafe {
1316            from_glib_none(ffi::nm_setting_802_1x_get_phase2_ca_cert_path(
1317                self.to_glib_none().0,
1318            ))
1319        }
1320    }
1321
1322    /// Returns the scheme used to store the "phase 2" CA certificate.  If the
1323    /// returned scheme is [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], use
1324    /// nm_setting_802_1x_get_ca_cert_blob(); if [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path],
1325    /// use nm_setting_802_1x_get_ca_cert_path(); if [`Setting8021xCKScheme::Pkcs11`][crate::Setting8021xCKScheme::Pkcs11],
1326    /// use nm_setting_802_1x_get_ca_cert_uri().
1327    ///
1328    /// # Returns
1329    ///
1330    /// scheme used to store the "phase 2" CA certificate (blob or path)
1331    #[doc(alias = "nm_setting_802_1x_get_phase2_ca_cert_scheme")]
1332    #[doc(alias = "get_phase2_ca_cert_scheme")]
1333    pub fn phase2_ca_cert_scheme(&self) -> Setting8021xCKScheme {
1334        unsafe {
1335            from_glib(ffi::nm_setting_802_1x_get_phase2_ca_cert_scheme(
1336                self.to_glib_none().0,
1337            ))
1338        }
1339    }
1340
1341    /// Returns the "phase 2" CA certificate URI analogously to
1342    /// nm_setting_802_1x_get_phase2_ca_cert_blob() and
1343    /// nm_setting_802_1x_get_phase2_ca_cert_path().
1344    ///
1345    /// Currently, it's limited to PKCS#<!-- -->11 URIs ('pkcs11' scheme as defined by RFC
1346    /// 7512), but may be extended to other schemes in future (such as 'file' URIs
1347    /// for local files and 'data' URIs for inline certificate data).
1348    ///
1349    /// # Returns
1350    ///
1351    /// the URI string
1352    #[cfg(feature = "v1_6")]
1353    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
1354    #[doc(alias = "nm_setting_802_1x_get_phase2_ca_cert_uri")]
1355    #[doc(alias = "get_phase2_ca_cert_uri")]
1356    pub fn phase2_ca_cert_uri(&self) -> glib::GString {
1357        unsafe {
1358            from_glib_none(ffi::nm_setting_802_1x_get_phase2_ca_cert_uri(
1359                self.to_glib_none().0,
1360            ))
1361        }
1362    }
1363
1364    /// Returns the path of the "phase 2" CA certificate directory if previously set.
1365    /// Systems will often have a directory that contains multiple individual CA
1366    /// certificates which the supplicant can then add to the verification chain.
1367    /// This may be used in addition to the #NMSetting8021x:phase2-ca-cert property
1368    /// to add more CA certificates for verifying the network to client.
1369    ///
1370    /// # Returns
1371    ///
1372    /// the "phase 2" CA certificate directory path
1373    #[doc(alias = "nm_setting_802_1x_get_phase2_ca_path")]
1374    #[doc(alias = "get_phase2_ca_path")]
1375    #[doc(alias = "phase2-ca-path")]
1376    pub fn phase2_ca_path(&self) -> glib::GString {
1377        unsafe {
1378            from_glib_none(ffi::nm_setting_802_1x_get_phase2_ca_path(
1379                self.to_glib_none().0,
1380            ))
1381        }
1382    }
1383
1384    //#[doc(alias = "nm_setting_802_1x_get_phase2_client_cert_blob")]
1385    //#[doc(alias = "get_phase2_client_cert_blob")]
1386    //pub fn phase2_client_cert_blob(&self) -> /*Ignored*/glib::Bytes {
1387    //    unsafe { TODO: call ffi:nm_setting_802_1x_get_phase2_client_cert_blob() }
1388    //}
1389
1390    ///
1391    /// # Returns
1392    ///
1393    /// the password used to access the "phase2" client certificate stored in
1394    /// #NMSetting8021x:phase2-client-cert property. Only makes sense if the certificate
1395    /// is stored on a PKCS#<!-- -->11 token that requires a login.
1396    #[cfg(feature = "v1_8")]
1397    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
1398    #[doc(alias = "nm_setting_802_1x_get_phase2_client_cert_password")]
1399    #[doc(alias = "get_phase2_client_cert_password")]
1400    #[doc(alias = "phase2-client-cert-password")]
1401    pub fn phase2_client_cert_password(&self) -> glib::GString {
1402        unsafe {
1403            from_glib_none(ffi::nm_setting_802_1x_get_phase2_client_cert_password(
1404                self.to_glib_none().0,
1405            ))
1406        }
1407    }
1408
1409    ///
1410    /// # Returns
1411    ///
1412    /// the #NMSettingSecretFlags pertaining to the
1413    /// #NMSetting8021x:phase2-client-cert-password
1414    #[cfg(feature = "v1_8")]
1415    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
1416    #[doc(alias = "nm_setting_802_1x_get_phase2_client_cert_password_flags")]
1417    #[doc(alias = "get_phase2_client_cert_password_flags")]
1418    #[doc(alias = "phase2-client-cert-password-flags")]
1419    pub fn phase2_client_cert_password_flags(&self) -> SettingSecretFlags {
1420        unsafe {
1421            from_glib(
1422                ffi::nm_setting_802_1x_get_phase2_client_cert_password_flags(self.to_glib_none().0),
1423            )
1424        }
1425    }
1426
1427    /// Client certificates are used to identify the connecting client to the network
1428    /// when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
1429    /// authentication method.
1430    ///
1431    /// # Returns
1432    ///
1433    /// path to the "phase 2" client certificate file
1434    #[doc(alias = "nm_setting_802_1x_get_phase2_client_cert_path")]
1435    #[doc(alias = "get_phase2_client_cert_path")]
1436    pub fn phase2_client_cert_path(&self) -> glib::GString {
1437        unsafe {
1438            from_glib_none(ffi::nm_setting_802_1x_get_phase2_client_cert_path(
1439                self.to_glib_none().0,
1440            ))
1441        }
1442    }
1443
1444    /// Returns the scheme used to store the "phase 2" client certificate.  If the
1445    /// returned scheme is [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], use
1446    /// nm_setting_802_1x_get_client_cert_blob(); if
1447    /// [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path], use
1448    /// nm_setting_802_1x_get_client_cert_path(); if
1449    /// [`Setting8021xCKScheme::Pkcs11`][crate::Setting8021xCKScheme::Pkcs11], use
1450    /// nm_setting_802_1x_get_client_cert_uri().
1451    ///
1452    /// # Returns
1453    ///
1454    /// scheme used to store the "phase 2" client certificate (blob or path)
1455    #[doc(alias = "nm_setting_802_1x_get_phase2_client_cert_scheme")]
1456    #[doc(alias = "get_phase2_client_cert_scheme")]
1457    pub fn phase2_client_cert_scheme(&self) -> Setting8021xCKScheme {
1458        unsafe {
1459            from_glib(ffi::nm_setting_802_1x_get_phase2_client_cert_scheme(
1460                self.to_glib_none().0,
1461            ))
1462        }
1463    }
1464
1465    /// Returns the "phase 2" client certificate URI analogously to
1466    /// nm_setting_802_1x_get_phase2_ca_cert_blob() and
1467    /// nm_setting_802_1x_get_phase2_ca_cert_path().
1468    ///
1469    /// Currently, it's limited to PKCS#<!-- -->11 URIs ('pkcs11' scheme as defined by RFC
1470    /// 7512), but may be extended to other schemes in future (such as 'file' URIs
1471    /// for local files and 'data' URIs for inline certificate data).
1472    ///
1473    /// # Returns
1474    ///
1475    /// the URI string
1476    #[cfg(feature = "v1_6")]
1477    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
1478    #[doc(alias = "nm_setting_802_1x_get_phase2_client_cert_uri")]
1479    #[doc(alias = "get_phase2_client_cert_uri")]
1480    pub fn phase2_client_cert_uri(&self) -> glib::GString {
1481        unsafe {
1482            from_glib_none(ffi::nm_setting_802_1x_get_phase2_client_cert_uri(
1483                self.to_glib_none().0,
1484            ))
1485        }
1486    }
1487
1488    ///
1489    /// # Returns
1490    ///
1491    /// the #NMSetting8021x:phase2-domain-match property.
1492    #[cfg(feature = "v1_24")]
1493    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
1494    #[doc(alias = "nm_setting_802_1x_get_phase2_domain_match")]
1495    #[doc(alias = "get_phase2_domain_match")]
1496    #[doc(alias = "phase2-domain-match")]
1497    pub fn phase2_domain_match(&self) -> glib::GString {
1498        unsafe {
1499            from_glib_none(ffi::nm_setting_802_1x_get_phase2_domain_match(
1500                self.to_glib_none().0,
1501            ))
1502        }
1503    }
1504
1505    ///
1506    /// # Returns
1507    ///
1508    /// the #NMSetting8021x:phase2-domain-suffix-match property.
1509    #[cfg(feature = "v1_2")]
1510    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1511    #[doc(alias = "nm_setting_802_1x_get_phase2_domain_suffix_match")]
1512    #[doc(alias = "get_phase2_domain_suffix_match")]
1513    #[doc(alias = "phase2-domain-suffix-match")]
1514    pub fn phase2_domain_suffix_match(&self) -> glib::GString {
1515        unsafe {
1516            from_glib_none(ffi::nm_setting_802_1x_get_phase2_domain_suffix_match(
1517                self.to_glib_none().0,
1518            ))
1519        }
1520    }
1521
1522    //#[doc(alias = "nm_setting_802_1x_get_phase2_private_key_blob")]
1523    //#[doc(alias = "get_phase2_private_key_blob")]
1524    //pub fn phase2_private_key_blob(&self) -> /*Ignored*/glib::Bytes {
1525    //    unsafe { TODO: call ffi:nm_setting_802_1x_get_phase2_private_key_blob() }
1526    //}
1527
1528    ///
1529    /// # Returns
1530    ///
1531    /// the data format of the "phase 2" private key data stored in the
1532    ///   #NMSetting8021x:phase2-private-key property
1533    #[doc(alias = "nm_setting_802_1x_get_phase2_private_key_format")]
1534    #[doc(alias = "get_phase2_private_key_format")]
1535    pub fn phase2_private_key_format(&self) -> Setting8021xCKFormat {
1536        unsafe {
1537            from_glib(ffi::nm_setting_802_1x_get_phase2_private_key_format(
1538                self.to_glib_none().0,
1539            ))
1540        }
1541    }
1542
1543    ///
1544    /// # Returns
1545    ///
1546    /// the private key password used to decrypt the private key if
1547    ///  previously set with nm_setting_802_1x_set_phase2_private_key() or the
1548    ///  #NMSetting8021x:phase2-private-key-password property.
1549    #[doc(alias = "nm_setting_802_1x_get_phase2_private_key_password")]
1550    #[doc(alias = "get_phase2_private_key_password")]
1551    #[doc(alias = "phase2-private-key-password")]
1552    pub fn phase2_private_key_password(&self) -> glib::GString {
1553        unsafe {
1554            from_glib_none(ffi::nm_setting_802_1x_get_phase2_private_key_password(
1555                self.to_glib_none().0,
1556            ))
1557        }
1558    }
1559
1560    ///
1561    /// # Returns
1562    ///
1563    /// the #NMSettingSecretFlags pertaining to the
1564    /// #NMSetting8021x:phase2-private-key-password
1565    #[doc(alias = "nm_setting_802_1x_get_phase2_private_key_password_flags")]
1566    #[doc(alias = "get_phase2_private_key_password_flags")]
1567    #[doc(alias = "phase2-private-key-password-flags")]
1568    pub fn phase2_private_key_password_flags(&self) -> SettingSecretFlags {
1569        unsafe {
1570            from_glib(
1571                ffi::nm_setting_802_1x_get_phase2_private_key_password_flags(self.to_glib_none().0),
1572            )
1573        }
1574    }
1575
1576    /// Private keys are used to authenticate the connecting client to the network
1577    /// when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
1578    /// authentication method.
1579    ///
1580    /// # Returns
1581    ///
1582    /// path to the "phase 2" private key file
1583    #[doc(alias = "nm_setting_802_1x_get_phase2_private_key_path")]
1584    #[doc(alias = "get_phase2_private_key_path")]
1585    pub fn phase2_private_key_path(&self) -> glib::GString {
1586        unsafe {
1587            from_glib_none(ffi::nm_setting_802_1x_get_phase2_private_key_path(
1588                self.to_glib_none().0,
1589            ))
1590        }
1591    }
1592
1593    /// Returns the scheme used to store the "phase 2" private key.  If the returned
1594    /// scheme is [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], use
1595    /// nm_setting_802_1x_get_client_cert_blob(); if
1596    /// [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path], use
1597    /// nm_setting_802_1x_get_client_cert_path(); if
1598    /// [`Setting8021xCKScheme::Pkcs11`][crate::Setting8021xCKScheme::Pkcs11], use
1599    /// nm_setting_802_1x_get_client_cert_uri().
1600    ///
1601    /// # Returns
1602    ///
1603    /// scheme used to store the "phase 2" private key (blob or path)
1604    #[doc(alias = "nm_setting_802_1x_get_phase2_private_key_scheme")]
1605    #[doc(alias = "get_phase2_private_key_scheme")]
1606    pub fn phase2_private_key_scheme(&self) -> Setting8021xCKScheme {
1607        unsafe {
1608            from_glib(ffi::nm_setting_802_1x_get_phase2_private_key_scheme(
1609                self.to_glib_none().0,
1610            ))
1611        }
1612    }
1613
1614    /// Returns the "phase 2" private key URI analogously to
1615    /// nm_setting_802_1x_get_phase2_private_key_blob() and
1616    /// nm_setting_802_1x_get_phase2_private_key_path().
1617    ///
1618    /// Currently, it's limited to PKCS#<!-- -->11 URIs ('pkcs11' scheme as defined by RFC
1619    /// 7512), but may be extended to other schemes in future (such as 'file' URIs
1620    /// for local files and 'data' URIs for inline certificate data).
1621    ///
1622    /// # Returns
1623    ///
1624    /// the URI string
1625    #[cfg(feature = "v1_6")]
1626    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
1627    #[doc(alias = "nm_setting_802_1x_get_phase2_private_key_uri")]
1628    #[doc(alias = "get_phase2_private_key_uri")]
1629    pub fn phase2_private_key_uri(&self) -> glib::GString {
1630        unsafe {
1631            from_glib_none(ffi::nm_setting_802_1x_get_phase2_private_key_uri(
1632                self.to_glib_none().0,
1633            ))
1634        }
1635    }
1636
1637    ///
1638    /// # Returns
1639    ///
1640    /// the #NMSetting8021x:phase2-subject-match property. This is
1641    /// the substring to be matched against the subject of the "phase 2"
1642    /// authentication server certificate, or [`None`] no subject verification
1643    /// is to be performed.
1644    #[doc(alias = "nm_setting_802_1x_get_phase2_subject_match")]
1645    #[doc(alias = "get_phase2_subject_match")]
1646    #[doc(alias = "phase2-subject-match")]
1647    pub fn phase2_subject_match(&self) -> glib::GString {
1648        unsafe {
1649            from_glib_none(ffi::nm_setting_802_1x_get_phase2_subject_match(
1650                self.to_glib_none().0,
1651            ))
1652        }
1653    }
1654
1655    ///
1656    /// # Returns
1657    ///
1658    /// the PIN used by the authentication method, if any, as specified
1659    ///   by the #NMSetting8021x:pin property
1660    #[doc(alias = "nm_setting_802_1x_get_pin")]
1661    #[doc(alias = "get_pin")]
1662    pub fn pin(&self) -> glib::GString {
1663        unsafe { from_glib_none(ffi::nm_setting_802_1x_get_pin(self.to_glib_none().0)) }
1664    }
1665
1666    ///
1667    /// # Returns
1668    ///
1669    /// the #NMSettingSecretFlags pertaining to the
1670    /// #NMSetting8021x:pin
1671    #[doc(alias = "nm_setting_802_1x_get_pin_flags")]
1672    #[doc(alias = "get_pin_flags")]
1673    #[doc(alias = "pin-flags")]
1674    pub fn pin_flags(&self) -> SettingSecretFlags {
1675        unsafe { from_glib(ffi::nm_setting_802_1x_get_pin_flags(self.to_glib_none().0)) }
1676    }
1677
1678    //#[doc(alias = "nm_setting_802_1x_get_private_key_blob")]
1679    //#[doc(alias = "get_private_key_blob")]
1680    //pub fn private_key_blob(&self) -> /*Ignored*/glib::Bytes {
1681    //    unsafe { TODO: call ffi:nm_setting_802_1x_get_private_key_blob() }
1682    //}
1683
1684    ///
1685    /// # Returns
1686    ///
1687    /// the data format of the private key data stored in the
1688    ///   #NMSetting8021x:private-key property
1689    #[doc(alias = "nm_setting_802_1x_get_private_key_format")]
1690    #[doc(alias = "get_private_key_format")]
1691    pub fn private_key_format(&self) -> Setting8021xCKFormat {
1692        unsafe {
1693            from_glib(ffi::nm_setting_802_1x_get_private_key_format(
1694                self.to_glib_none().0,
1695            ))
1696        }
1697    }
1698
1699    ///
1700    /// # Returns
1701    ///
1702    /// the private key password used to decrypt the private key if
1703    ///  previously set with nm_setting_802_1x_set_private_key(), or the
1704    ///  #NMSetting8021x:private-key-password property.
1705    #[doc(alias = "nm_setting_802_1x_get_private_key_password")]
1706    #[doc(alias = "get_private_key_password")]
1707    #[doc(alias = "private-key-password")]
1708    pub fn private_key_password(&self) -> glib::GString {
1709        unsafe {
1710            from_glib_none(ffi::nm_setting_802_1x_get_private_key_password(
1711                self.to_glib_none().0,
1712            ))
1713        }
1714    }
1715
1716    ///
1717    /// # Returns
1718    ///
1719    /// the #NMSettingSecretFlags pertaining to the
1720    /// #NMSetting8021x:private-key-password
1721    #[doc(alias = "nm_setting_802_1x_get_private_key_password_flags")]
1722    #[doc(alias = "get_private_key_password_flags")]
1723    #[doc(alias = "private-key-password-flags")]
1724    pub fn private_key_password_flags(&self) -> SettingSecretFlags {
1725        unsafe {
1726            from_glib(ffi::nm_setting_802_1x_get_private_key_password_flags(
1727                self.to_glib_none().0,
1728            ))
1729        }
1730    }
1731
1732    /// Private keys are used to authenticate the connecting client to the network
1733    /// when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
1734    /// authentication method.
1735    ///
1736    /// # Returns
1737    ///
1738    /// path to the private key file
1739    #[doc(alias = "nm_setting_802_1x_get_private_key_path")]
1740    #[doc(alias = "get_private_key_path")]
1741    pub fn private_key_path(&self) -> glib::GString {
1742        unsafe {
1743            from_glib_none(ffi::nm_setting_802_1x_get_private_key_path(
1744                self.to_glib_none().0,
1745            ))
1746        }
1747    }
1748
1749    /// Returns the scheme used to store the private key.  If the returned scheme is
1750    /// [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], use
1751    /// nm_setting_802_1x_get_client_cert_blob(); if
1752    /// [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path], use
1753    /// nm_setting_802_1x_get_client_cert_path(); if
1754    /// [`Setting8021xCKScheme::Pkcs11`][crate::Setting8021xCKScheme::Pkcs11], use
1755    /// nm_setting_802_1x_get_client_cert_uri().
1756    ///
1757    /// # Returns
1758    ///
1759    /// scheme used to store the private key (blob or path)
1760    #[doc(alias = "nm_setting_802_1x_get_private_key_scheme")]
1761    #[doc(alias = "get_private_key_scheme")]
1762    pub fn private_key_scheme(&self) -> Setting8021xCKScheme {
1763        unsafe {
1764            from_glib(ffi::nm_setting_802_1x_get_private_key_scheme(
1765                self.to_glib_none().0,
1766            ))
1767        }
1768    }
1769
1770    /// Returns the private key URI analogously to
1771    /// nm_setting_802_1x_get_private_key_blob() and
1772    /// nm_setting_802_1x_get_private_key_path().
1773    ///
1774    /// Currently, it's limited to PKCS#<!-- -->11 URIs ('pkcs11' scheme as defined by RFC
1775    /// 7512), but may be extended to other schemes in future (such as 'file' URIs
1776    /// for local files and 'data' URIs for inline certificate data).
1777    ///
1778    /// # Returns
1779    ///
1780    /// the URI string
1781    #[cfg(feature = "v1_6")]
1782    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
1783    #[doc(alias = "nm_setting_802_1x_get_private_key_uri")]
1784    #[doc(alias = "get_private_key_uri")]
1785    pub fn private_key_uri(&self) -> glib::GString {
1786        unsafe {
1787            from_glib_none(ffi::nm_setting_802_1x_get_private_key_uri(
1788                self.to_glib_none().0,
1789            ))
1790        }
1791    }
1792
1793    ///
1794    /// # Returns
1795    ///
1796    /// the #NMSetting8021x:subject-match property. This is the
1797    /// substring to be matched against the subject of the authentication
1798    /// server certificate, or [`None`] no subject verification is to be
1799    /// performed.
1800    #[doc(alias = "nm_setting_802_1x_get_subject_match")]
1801    #[doc(alias = "get_subject_match")]
1802    #[doc(alias = "subject-match")]
1803    pub fn subject_match(&self) -> glib::GString {
1804        unsafe {
1805            from_glib_none(ffi::nm_setting_802_1x_get_subject_match(
1806                self.to_glib_none().0,
1807            ))
1808        }
1809    }
1810
1811    /// Sets the #NMSetting8021x:system-ca-certs property. The
1812    /// #NMSetting8021x:ca-path and #NMSetting8021x:phase2-ca-path
1813    /// properties are ignored if the #NMSetting8021x:system-ca-certs property is
1814    /// [`true`], in which case a system-wide CA certificate directory specified at
1815    /// compile time (using the --system-ca-path configure option) is used in place
1816    /// of these properties.
1817    ///
1818    /// # Returns
1819    ///
1820    /// [`true`] if a system CA certificate path should be used, [`false`] if not
1821    #[doc(alias = "nm_setting_802_1x_get_system_ca_certs")]
1822    #[doc(alias = "get_system_ca_certs")]
1823    #[doc(alias = "system-ca-certs")]
1824    pub fn is_system_ca_certs(&self) -> bool {
1825        unsafe {
1826            from_glib(ffi::nm_setting_802_1x_get_system_ca_certs(
1827                self.to_glib_none().0,
1828            ))
1829        }
1830    }
1831
1832    /// Removes the allowed altSubjectName at the specified index.
1833    /// ## `i`
1834    /// the index of the altSubjectName match to remove
1835    #[doc(alias = "nm_setting_802_1x_remove_altsubject_match")]
1836    pub fn remove_altsubject_match(&self, i: u32) {
1837        unsafe {
1838            ffi::nm_setting_802_1x_remove_altsubject_match(self.to_glib_none().0, i);
1839        }
1840    }
1841
1842    /// Removes the allowed altSubjectName @altsubject_match.
1843    /// ## `altsubject_match`
1844    /// the altSubjectName to remove
1845    ///
1846    /// # Returns
1847    ///
1848    /// [`true`] if the alternative subject name match was found and removed,
1849    ///          [`false`] if it was not.
1850    #[doc(alias = "nm_setting_802_1x_remove_altsubject_match_by_value")]
1851    pub fn remove_altsubject_match_by_value(&self, altsubject_match: &str) -> bool {
1852        unsafe {
1853            from_glib(ffi::nm_setting_802_1x_remove_altsubject_match_by_value(
1854                self.to_glib_none().0,
1855                altsubject_match.to_glib_none().0,
1856            ))
1857        }
1858    }
1859
1860    /// Removes the allowed EAP method at the specified index.
1861    /// ## `i`
1862    /// the index of the EAP method to remove
1863    #[doc(alias = "nm_setting_802_1x_remove_eap_method")]
1864    pub fn remove_eap_method(&self, i: u32) {
1865        unsafe {
1866            ffi::nm_setting_802_1x_remove_eap_method(self.to_glib_none().0, i);
1867        }
1868    }
1869
1870    /// Removes the allowed EAP method @method.
1871    /// ## `eap`
1872    /// the name of the EAP method to remove
1873    ///
1874    /// # Returns
1875    ///
1876    /// [`true`] if the EAP method was founs and removed, [`false`] if it was not.
1877    #[doc(alias = "nm_setting_802_1x_remove_eap_method_by_value")]
1878    pub fn remove_eap_method_by_value(&self, eap: &str) -> bool {
1879        unsafe {
1880            from_glib(ffi::nm_setting_802_1x_remove_eap_method_by_value(
1881                self.to_glib_none().0,
1882                eap.to_glib_none().0,
1883            ))
1884        }
1885    }
1886
1887    /// Removes the allowed "phase 2" altSubjectName at the specified index.
1888    /// ## `i`
1889    /// the index of the "phase 2" altSubjectName match to remove
1890    #[doc(alias = "nm_setting_802_1x_remove_phase2_altsubject_match")]
1891    pub fn remove_phase2_altsubject_match(&self, i: u32) {
1892        unsafe {
1893            ffi::nm_setting_802_1x_remove_phase2_altsubject_match(self.to_glib_none().0, i);
1894        }
1895    }
1896
1897    /// Removes the allowed "phase 2" altSubjectName @phase2_altsubject_match.
1898    /// ## `phase2_altsubject_match`
1899    /// the "phase 2" altSubjectName to remove
1900    ///
1901    /// # Returns
1902    ///
1903    /// [`true`] if the alternative subject name match for "phase 2" was found and removed,
1904    ///          [`false`] if it was not.
1905    #[doc(alias = "nm_setting_802_1x_remove_phase2_altsubject_match_by_value")]
1906    pub fn remove_phase2_altsubject_match_by_value(&self, phase2_altsubject_match: &str) -> bool {
1907        unsafe {
1908            from_glib(
1909                ffi::nm_setting_802_1x_remove_phase2_altsubject_match_by_value(
1910                    self.to_glib_none().0,
1911                    phase2_altsubject_match.to_glib_none().0,
1912                ),
1913            )
1914        }
1915    }
1916
1917    /// Reads a certificate from disk and sets the #NMSetting8021x:ca-cert property
1918    /// with the raw certificate data if using the [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob]
1919    /// scheme, or with the path to the certificate file if using the
1920    /// [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] scheme.
1921    /// ## `value`
1922    /// when @scheme is set to either [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path]
1923    ///   or [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], pass the path of the CA certificate
1924    ///   file (PEM or DER format).  The path must be UTF-8 encoded; use
1925    ///   g_filename_to_utf8() to convert if needed.  Passing [`None`] with any @scheme
1926    ///   clears the CA certificate.
1927    /// ## `scheme`
1928    /// desired storage scheme for the certificate
1929    /// ## `out_format`
1930    /// on successful return, the type of the certificate added
1931    ///
1932    /// # Returns
1933    ///
1934    /// [`true`] if the operation succeeded, [`false`] if it was unsuccessful
1935    #[doc(alias = "nm_setting_802_1x_set_ca_cert")]
1936    #[doc(alias = "ca-cert")]
1937    pub fn set_ca_cert(
1938        &self,
1939        value: &str,
1940        scheme: Setting8021xCKScheme,
1941        out_format: Setting8021xCKFormat,
1942    ) -> Result<(), glib::Error> {
1943        unsafe {
1944            let mut error = std::ptr::null_mut();
1945            let is_ok = ffi::nm_setting_802_1x_set_ca_cert(
1946                self.to_glib_none().0,
1947                value.to_glib_none().0,
1948                scheme.into_glib(),
1949                &mut out_format.into_glib(),
1950                &mut error,
1951            );
1952            debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
1953            if error.is_null() {
1954                Ok(())
1955            } else {
1956                Err(from_glib_full(error))
1957            }
1958        }
1959    }
1960
1961    /// Reads a certificate from disk and sets the #NMSetting8021x:client-cert
1962    /// property with the raw certificate data if using the
1963    /// [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob] scheme, or with the path to the certificate
1964    /// file if using the [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] scheme.
1965    ///
1966    /// Client certificates are used to identify the connecting client to the network
1967    /// when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
1968    /// authentication method.
1969    /// ## `value`
1970    /// when @scheme is set to either [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path]
1971    ///   or [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], pass the path of the client
1972    ///   certificate file (PEM, DER, or PKCS#<!-- -->12 format).  The path must be UTF-8
1973    ///   encoded; use g_filename_to_utf8() to convert if needed.  Passing [`None`] with
1974    ///   any @scheme clears the client certificate.
1975    /// ## `scheme`
1976    /// desired storage scheme for the certificate
1977    /// ## `out_format`
1978    /// on successful return, the type of the certificate added
1979    ///
1980    /// # Returns
1981    ///
1982    /// [`true`] if the operation succeeded, [`false`] if it was unsuccessful
1983    #[doc(alias = "nm_setting_802_1x_set_client_cert")]
1984    #[doc(alias = "client-cert")]
1985    pub fn set_client_cert(
1986        &self,
1987        value: &str,
1988        scheme: Setting8021xCKScheme,
1989        out_format: Setting8021xCKFormat,
1990    ) -> Result<(), glib::Error> {
1991        unsafe {
1992            let mut error = std::ptr::null_mut();
1993            let is_ok = ffi::nm_setting_802_1x_set_client_cert(
1994                self.to_glib_none().0,
1995                value.to_glib_none().0,
1996                scheme.into_glib(),
1997                &mut out_format.into_glib(),
1998                &mut error,
1999            );
2000            debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
2001            if error.is_null() {
2002                Ok(())
2003            } else {
2004                Err(from_glib_full(error))
2005            }
2006        }
2007    }
2008
2009    /// Reads a certificate from disk and sets the #NMSetting8021x:phase2-ca-cert
2010    /// property with the raw certificate data if using the
2011    /// [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob] scheme, or with the path to the certificate
2012    /// file if using the [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] scheme.
2013    /// ## `value`
2014    /// when @scheme is set to either [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path]
2015    ///   or [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], pass the path of the "phase2" CA
2016    ///   certificate file (PEM or DER format).  The path must be UTF-8 encoded; use
2017    ///   g_filename_to_utf8() to convert if needed.  Passing [`None`] with any @scheme
2018    ///   clears the "phase2" CA certificate.
2019    /// ## `scheme`
2020    /// desired storage scheme for the certificate
2021    /// ## `out_format`
2022    /// on successful return, the type of the certificate added
2023    ///
2024    /// # Returns
2025    ///
2026    /// [`true`] if the operation succeeded, [`false`] if it was unsuccessful
2027    #[doc(alias = "nm_setting_802_1x_set_phase2_ca_cert")]
2028    #[doc(alias = "phase2-ca-cert")]
2029    pub fn set_phase2_ca_cert(
2030        &self,
2031        value: &str,
2032        scheme: Setting8021xCKScheme,
2033        out_format: Setting8021xCKFormat,
2034    ) -> Result<(), glib::Error> {
2035        unsafe {
2036            let mut error = std::ptr::null_mut();
2037            let is_ok = ffi::nm_setting_802_1x_set_phase2_ca_cert(
2038                self.to_glib_none().0,
2039                value.to_glib_none().0,
2040                scheme.into_glib(),
2041                &mut out_format.into_glib(),
2042                &mut error,
2043            );
2044            debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
2045            if error.is_null() {
2046                Ok(())
2047            } else {
2048                Err(from_glib_full(error))
2049            }
2050        }
2051    }
2052
2053    /// Reads a certificate from disk and sets the #NMSetting8021x:phase2-client-cert
2054    /// property with the raw certificate data if using the
2055    /// [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob] scheme, or with the path to the certificate
2056    /// file if using the [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] scheme.
2057    ///
2058    /// Client certificates are used to identify the connecting client to the network
2059    /// when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
2060    /// authentication method.
2061    /// ## `value`
2062    /// when @scheme is set to either [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path]
2063    ///   or [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], pass the path of the "phase2" client
2064    ///   certificate file (PEM, DER, or PKCS#<!-- -->12 format).  The path must be UTF-8
2065    ///   encoded; use g_filename_to_utf8() to convert if needed.  Passing [`None`] with
2066    ///   any @scheme clears the "phase2" client certificate.
2067    /// ## `scheme`
2068    /// desired storage scheme for the certificate
2069    /// ## `out_format`
2070    /// on successful return, the type of the certificate added
2071    ///
2072    /// # Returns
2073    ///
2074    /// [`true`] if the operation succeeded, [`false`] if it was unsuccessful
2075    #[doc(alias = "nm_setting_802_1x_set_phase2_client_cert")]
2076    #[doc(alias = "phase2-client-cert")]
2077    pub fn set_phase2_client_cert(
2078        &self,
2079        value: &str,
2080        scheme: Setting8021xCKScheme,
2081        out_format: Setting8021xCKFormat,
2082    ) -> Result<(), glib::Error> {
2083        unsafe {
2084            let mut error = std::ptr::null_mut();
2085            let is_ok = ffi::nm_setting_802_1x_set_phase2_client_cert(
2086                self.to_glib_none().0,
2087                value.to_glib_none().0,
2088                scheme.into_glib(),
2089                &mut out_format.into_glib(),
2090                &mut error,
2091            );
2092            debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
2093            if error.is_null() {
2094                Ok(())
2095            } else {
2096                Err(from_glib_full(error))
2097            }
2098        }
2099    }
2100
2101    /// Private keys are used to authenticate the connecting client to the network
2102    /// when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
2103    /// authentication method.
2104    ///
2105    /// This function reads a private key from disk and sets the
2106    /// #NMSetting8021x:phase2-private-key property with the private key file data if
2107    /// using the [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob] scheme, or with the path to the
2108    /// private key file if using the [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] scheme.
2109    ///
2110    /// If @password is given, this function attempts to decrypt the private key to
2111    /// verify that @password is correct, and if it is, updates the
2112    /// #NMSetting8021x:phase2-private-key-password property with the given
2113    /// @password.  If the decryption is unsuccessful, [`false`] is returned, @error is
2114    /// set, and no internal data is changed.  If no @password is given, the private
2115    /// key is assumed to be valid, no decryption is performed, and the password may
2116    /// be set at a later time.
2117    ///
2118    /// WARNING: the "phase2" private key property is not a "secret" property, and
2119    /// thus unencrypted private key data using the BLOB scheme may be readable by
2120    /// unprivileged users.  Private keys should always be encrypted with a private
2121    /// key password to prevent unauthorized access to unencrypted private key data.
2122    /// ## `value`
2123    /// when @scheme is set to either [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] or
2124    ///   [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], pass the path of the "phase2" private
2125    ///   key file (PEM, DER, or PKCS#<!-- -->12 format).  The path must be UTF-8 encoded;
2126    ///   use g_filename_to_utf8() to convert if needed.  Passing [`None`] with any
2127    ///   @scheme clears the private key.
2128    /// ## `password`
2129    /// password used to decrypt the private key, or [`None`] if the password
2130    ///   is unknown.  If the password is given but fails to decrypt the private key,
2131    ///   an error is returned.
2132    /// ## `scheme`
2133    /// desired storage scheme for the private key
2134    /// ## `out_format`
2135    /// on successful return, the type of the private key added
2136    ///
2137    /// # Returns
2138    ///
2139    /// [`true`] if the operation succeeded, [`false`] if it was unsuccessful
2140    #[doc(alias = "nm_setting_802_1x_set_phase2_private_key")]
2141    #[doc(alias = "phase2-private-key")]
2142    pub fn set_phase2_private_key(
2143        &self,
2144        value: &str,
2145        password: &str,
2146        scheme: Setting8021xCKScheme,
2147        out_format: Setting8021xCKFormat,
2148    ) -> Result<(), glib::Error> {
2149        unsafe {
2150            let mut error = std::ptr::null_mut();
2151            let is_ok = ffi::nm_setting_802_1x_set_phase2_private_key(
2152                self.to_glib_none().0,
2153                value.to_glib_none().0,
2154                password.to_glib_none().0,
2155                scheme.into_glib(),
2156                &mut out_format.into_glib(),
2157                &mut error,
2158            );
2159            debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
2160            if error.is_null() {
2161                Ok(())
2162            } else {
2163                Err(from_glib_full(error))
2164            }
2165        }
2166    }
2167
2168    /// Private keys are used to authenticate the connecting client to the network
2169    /// when EAP-TLS is used as either the "phase 1" or "phase 2" 802.1x
2170    /// authentication method.
2171    ///
2172    /// This function reads a private key from disk and sets the
2173    /// #NMSetting8021x:private-key property with the private key file data if using
2174    /// the [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob] scheme, or with the path to the private
2175    /// key file if using the [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] scheme.
2176    ///
2177    /// If @password is given, this function attempts to decrypt the private key to
2178    /// verify that @password is correct, and if it is, updates the
2179    /// #NMSetting8021x:private-key-password property with the given @password.  If
2180    /// the decryption is unsuccessful, [`false`] is returned, @error is set, and no
2181    /// internal data is changed.  If no @password is given, the private key is
2182    /// assumed to be valid, no decryption is performed, and the password may be set
2183    /// at a later time.
2184    ///
2185    /// WARNING: the private key property is not a "secret" property, and thus
2186    /// unencrypted private key data using the BLOB scheme may be readable by
2187    /// unprivileged users.  Private keys should always be encrypted with a private
2188    /// key password to prevent unauthorized access to unencrypted private key data.
2189    /// ## `value`
2190    /// when @scheme is set to either [`Setting8021xCKScheme::Path`][crate::Setting8021xCKScheme::Path] or
2191    ///   [`Setting8021xCKScheme::Blob`][crate::Setting8021xCKScheme::Blob], pass the path of the private key file
2192    ///   (PEM, DER, or PKCS#<!-- -->12 format).  The path must be UTF-8 encoded; use
2193    ///   g_filename_to_utf8() to convert if needed.  Passing [`None`] with any @scheme
2194    ///   clears the private key.
2195    /// ## `password`
2196    /// password used to decrypt the private key, or [`None`] if the password
2197    ///   is unknown.  If the password is given but fails to decrypt the private key,
2198    ///   an error is returned.
2199    /// ## `scheme`
2200    /// desired storage scheme for the private key
2201    /// ## `out_format`
2202    /// on successful return, the type of the private key added
2203    ///
2204    /// # Returns
2205    ///
2206    /// [`true`] if the operation succeeded, [`false`] if it was unsuccessful
2207    #[doc(alias = "nm_setting_802_1x_set_private_key")]
2208    #[doc(alias = "private-key")]
2209    pub fn set_private_key(
2210        &self,
2211        value: &str,
2212        password: &str,
2213        scheme: Setting8021xCKScheme,
2214        out_format: Setting8021xCKFormat,
2215    ) -> Result<(), glib::Error> {
2216        unsafe {
2217            let mut error = std::ptr::null_mut();
2218            let is_ok = ffi::nm_setting_802_1x_set_private_key(
2219                self.to_glib_none().0,
2220                value.to_glib_none().0,
2221                password.to_glib_none().0,
2222                scheme.into_glib(),
2223                &mut out_format.into_glib(),
2224                &mut error,
2225            );
2226            debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
2227            if error.is_null() {
2228                Ok(())
2229            } else {
2230                Err(from_glib_full(error))
2231            }
2232        }
2233    }
2234
2235    /// List of strings to be matched against the altSubjectName of the
2236    /// certificate presented by the authentication server. If the list is empty,
2237    /// no verification of the server certificate's altSubjectName is performed.
2238    #[doc(alias = "altsubject-matches")]
2239    pub fn altsubject_matches(&self) -> Vec<glib::GString> {
2240        ObjectExt::property(self, "altsubject-matches")
2241    }
2242
2243    /// List of strings to be matched against the altSubjectName of the
2244    /// certificate presented by the authentication server. If the list is empty,
2245    /// no verification of the server certificate's altSubjectName is performed.
2246    #[doc(alias = "altsubject-matches")]
2247    pub fn set_altsubject_matches(&self, altsubject_matches: &[&str]) {
2248        ObjectExt::set_property(self, "altsubject-matches", altsubject_matches)
2249    }
2250
2251    /// Anonymous identity string for EAP authentication methods.  Used as the
2252    /// unencrypted identity with EAP types that support different tunneled
2253    /// identity like EAP-TTLS.
2254    #[doc(alias = "anonymous-identity")]
2255    pub fn set_anonymous_identity(&self, anonymous_identity: Option<&str>) {
2256        ObjectExt::set_property(self, "anonymous-identity", anonymous_identity)
2257    }
2258
2259    /// A timeout for the authentication. Zero means the global default; if the
2260    /// global default is not set, the authentication timeout is 25 seconds.
2261    #[cfg(feature = "v1_8")]
2262    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2263    #[doc(alias = "auth-timeout")]
2264    pub fn set_auth_timeout(&self, auth_timeout: i32) {
2265        ObjectExt::set_property(self, "auth-timeout", auth_timeout)
2266    }
2267
2268    //#[doc(alias = "ca-cert")]
2269    //pub fn ca_cert(&self) -> /*Ignored*/Option<glib::Bytes> {
2270    //    ObjectExt::property(self, "ca-cert")
2271    //}
2272
2273    /// The password used to access the CA certificate stored in
2274    /// #NMSetting8021x:ca-cert property. Only makes sense if the certificate
2275    /// is stored on a PKCS#<!-- -->11 token that requires a login.
2276    #[cfg(feature = "v1_8")]
2277    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2278    #[doc(alias = "ca-cert-password")]
2279    pub fn set_ca_cert_password(&self, ca_cert_password: Option<&str>) {
2280        ObjectExt::set_property(self, "ca-cert-password", ca_cert_password)
2281    }
2282
2283    /// Flags indicating how to handle the #NMSetting8021x:ca-cert-password property.
2284    #[cfg(feature = "v1_8")]
2285    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2286    #[doc(alias = "ca-cert-password-flags")]
2287    pub fn set_ca_cert_password_flags(&self, ca_cert_password_flags: SettingSecretFlags) {
2288        ObjectExt::set_property(self, "ca-cert-password-flags", ca_cert_password_flags)
2289    }
2290
2291    /// UTF-8 encoded path to a directory containing PEM or DER formatted
2292    /// certificates to be added to the verification chain in addition to the
2293    /// certificate specified in the #NMSetting8021x:ca-cert property.
2294    ///
2295    /// If NMSetting8021x:system-ca-certs is enabled and the built-in CA
2296    /// path is an existing directory, then this setting is ignored.
2297    #[doc(alias = "ca-path")]
2298    pub fn set_ca_path(&self, ca_path: Option<&str>) {
2299        ObjectExt::set_property(self, "ca-path", ca_path)
2300    }
2301
2302    //#[doc(alias = "client-cert")]
2303    //pub fn client_cert(&self) -> /*Ignored*/Option<glib::Bytes> {
2304    //    ObjectExt::property(self, "client-cert")
2305    //}
2306
2307    /// The password used to access the client certificate stored in
2308    /// #NMSetting8021x:client-cert property. Only makes sense if the certificate
2309    /// is stored on a PKCS#<!-- -->11 token that requires a login.
2310    #[cfg(feature = "v1_8")]
2311    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2312    #[doc(alias = "client-cert-password")]
2313    pub fn set_client_cert_password(&self, client_cert_password: Option<&str>) {
2314        ObjectExt::set_property(self, "client-cert-password", client_cert_password)
2315    }
2316
2317    /// Flags indicating how to handle the #NMSetting8021x:client-cert-password property.
2318    #[cfg(feature = "v1_8")]
2319    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2320    #[doc(alias = "client-cert-password-flags")]
2321    pub fn set_client_cert_password_flags(&self, client_cert_password_flags: SettingSecretFlags) {
2322        ObjectExt::set_property(
2323            self,
2324            "client-cert-password-flags",
2325            client_cert_password_flags,
2326        )
2327    }
2328
2329    /// Constraint for server domain name. If set, this list of FQDNs is used as
2330    /// a match requirement for dNSName element(s) of the certificate presented
2331    /// by the authentication server.  If a matching dNSName is found, this
2332    /// constraint is met.  If no dNSName values are present, this constraint is
2333    /// matched against SubjectName CN using the same comparison.
2334    /// Multiple valid FQDNs can be passed as a ";" delimited list.
2335    #[cfg(feature = "v1_24")]
2336    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
2337    #[doc(alias = "domain-match")]
2338    pub fn set_domain_match(&self, domain_match: Option<&str>) {
2339        ObjectExt::set_property(self, "domain-match", domain_match)
2340    }
2341
2342    /// Constraint for server domain name. If set, this FQDN is used as a suffix
2343    /// match requirement for dNSName element(s) of the certificate presented by
2344    /// the authentication server.  If a matching dNSName is found, this
2345    /// constraint is met.  If no dNSName values are present, this constraint is
2346    /// matched against SubjectName CN using same suffix match comparison.
2347    /// Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited
2348    /// list.
2349    #[cfg(feature = "v1_2")]
2350    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
2351    #[doc(alias = "domain-suffix-match")]
2352    pub fn set_domain_suffix_match(&self, domain_suffix_match: Option<&str>) {
2353        ObjectExt::set_property(self, "domain-suffix-match", domain_suffix_match)
2354    }
2355
2356    /// The allowed EAP method to be used when authenticating to the network with
2357    /// 802.1x.  Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd",
2358    /// and "fast".  Each method requires different configuration using the
2359    /// properties of this setting; refer to wpa_supplicant documentation for the
2360    /// allowed combinations.
2361    pub fn eap(&self) -> Vec<glib::GString> {
2362        ObjectExt::property(self, "eap")
2363    }
2364
2365    /// The allowed EAP method to be used when authenticating to the network with
2366    /// 802.1x.  Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd",
2367    /// and "fast".  Each method requires different configuration using the
2368    /// properties of this setting; refer to wpa_supplicant documentation for the
2369    /// allowed combinations.
2370    pub fn set_eap(&self, eap: &[&str]) {
2371        ObjectExt::set_property(self, "eap", eap)
2372    }
2373
2374    /// Identity string for EAP authentication methods.  Often the user's user or
2375    /// login name.
2376    pub fn set_identity(&self, identity: Option<&str>) {
2377        ObjectExt::set_property(self, "identity", identity)
2378    }
2379
2380    /// Define openssl_ciphers for wpa_supplicant. Openssl sometimes moves ciphers
2381    /// among SECLEVELs, thus compiled-in default value in wpa_supplicant
2382    /// (as modified by some linux distributions) sometimes prevents
2383    /// to connect to old servers that do not support new protocols.
2384    #[cfg(feature = "v1_48")]
2385    #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
2386    #[doc(alias = "openssl-ciphers")]
2387    pub fn set_openssl_ciphers(&self, openssl_ciphers: Option<&str>) {
2388        ObjectExt::set_property(self, "openssl-ciphers", openssl_ciphers)
2389    }
2390
2391    /// Whether the 802.1X authentication is optional. If [`true`], the activation
2392    /// will continue even after a timeout or an authentication failure. Setting
2393    /// the property to [`true`] is currently allowed only for Ethernet connections.
2394    /// If set to [`false`], the activation can continue only after a successful
2395    /// authentication.
2396    #[cfg(feature = "v1_22")]
2397    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2398    pub fn set_optional(&self, optional: bool) {
2399        ObjectExt::set_property(self, "optional", optional)
2400    }
2401
2402    /// UTF-8 encoded file path containing PAC for EAP-FAST.
2403    #[doc(alias = "pac-file")]
2404    pub fn set_pac_file(&self, pac_file: Option<&str>) {
2405        ObjectExt::set_property(self, "pac-file", pac_file)
2406    }
2407
2408    /// UTF-8 encoded password used for EAP authentication methods. If both the
2409    /// #NMSetting8021x:password property and the #NMSetting8021x:password-raw
2410    /// property are specified, #NMSetting8021x:password is preferred.
2411    pub fn set_password(&self, password: Option<&str>) {
2412        ObjectExt::set_property(self, "password", password)
2413    }
2414
2415    /// Flags indicating how to handle the #NMSetting8021x:password property.
2416    #[doc(alias = "password-flags")]
2417    pub fn set_password_flags(&self, password_flags: SettingSecretFlags) {
2418        ObjectExt::set_property(self, "password-flags", password_flags)
2419    }
2420
2421    //#[doc(alias = "password-raw")]
2422    //pub fn set_password_raw(&self, password_raw: /*Ignored*/Option<&glib::Bytes>) {
2423    //    ObjectExt::set_property(self,"password-raw", password_raw)
2424    //}
2425
2426    /// Flags indicating how to handle the #NMSetting8021x:password-raw property.
2427    #[doc(alias = "password-raw-flags")]
2428    pub fn set_password_raw_flags(&self, password_raw_flags: SettingSecretFlags) {
2429        ObjectExt::set_property(self, "password-raw-flags", password_raw_flags)
2430    }
2431
2432    /// Specifies authentication flags to use in "phase 1" outer
2433    /// authentication using #NMSetting8021xAuthFlags options.
2434    /// The individual TLS versions can be explicitly disabled. TLS time checks
2435    /// can be also disabled. If a certain TLS disable flag is not
2436    /// set, it is up to the supplicant to allow or forbid it. The TLS options
2437    /// map to tls_disable_tlsv1_x and tls_disable_time_checks settings.
2438    /// See the wpa_supplicant documentation for more details.
2439    #[cfg(feature = "v1_8")]
2440    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2441    #[doc(alias = "phase1-auth-flags")]
2442    pub fn set_phase1_auth_flags(&self, phase1_auth_flags: u32) {
2443        ObjectExt::set_property(self, "phase1-auth-flags", phase1_auth_flags)
2444    }
2445
2446    /// Enables or disables in-line provisioning of EAP-FAST credentials when
2447    /// FAST is specified as the EAP method in the #NMSetting8021x:eap property.
2448    /// Recognized values are "0" (disabled), "1" (allow unauthenticated
2449    /// provisioning), "2" (allow authenticated provisioning), and "3" (allow
2450    /// both authenticated and unauthenticated provisioning).  See the
2451    /// wpa_supplicant documentation for more details.
2452    #[doc(alias = "phase1-fast-provisioning")]
2453    pub fn set_phase1_fast_provisioning(&self, phase1_fast_provisioning: Option<&str>) {
2454        ObjectExt::set_property(self, "phase1-fast-provisioning", phase1_fast_provisioning)
2455    }
2456
2457    /// Forces use of the new PEAP label during key derivation.  Some RADIUS
2458    /// servers may require forcing the new PEAP label to interoperate with
2459    /// PEAPv1.  Set to "1" to force use of the new PEAP label.  See the
2460    /// wpa_supplicant documentation for more details.
2461    #[doc(alias = "phase1-peaplabel")]
2462    pub fn set_phase1_peaplabel(&self, phase1_peaplabel: Option<&str>) {
2463        ObjectExt::set_property(self, "phase1-peaplabel", phase1_peaplabel)
2464    }
2465
2466    /// Forces which PEAP version is used when PEAP is set as the EAP method in
2467    /// the #NMSetting8021x:eap property.  When unset, the version reported by
2468    /// the server will be used.  Sometimes when using older RADIUS servers, it
2469    /// is necessary to force the client to use a particular PEAP version.  To do
2470    /// so, this property may be set to "0" or "1" to force that specific PEAP
2471    /// version.
2472    #[doc(alias = "phase1-peapver")]
2473    pub fn set_phase1_peapver(&self, phase1_peapver: Option<&str>) {
2474        ObjectExt::set_property(self, "phase1-peapver", phase1_peapver)
2475    }
2476
2477    /// List of strings to be matched against the altSubjectName of the
2478    /// certificate presented by the authentication server during the inner
2479    /// "phase 2" authentication. If the list is empty, no verification of the
2480    /// server certificate's altSubjectName is performed.
2481    #[doc(alias = "phase2-altsubject-matches")]
2482    pub fn phase2_altsubject_matches(&self) -> Vec<glib::GString> {
2483        ObjectExt::property(self, "phase2-altsubject-matches")
2484    }
2485
2486    /// List of strings to be matched against the altSubjectName of the
2487    /// certificate presented by the authentication server during the inner
2488    /// "phase 2" authentication. If the list is empty, no verification of the
2489    /// server certificate's altSubjectName is performed.
2490    #[doc(alias = "phase2-altsubject-matches")]
2491    pub fn set_phase2_altsubject_matches(&self, phase2_altsubject_matches: &[&str]) {
2492        ObjectExt::set_property(self, "phase2-altsubject-matches", phase2_altsubject_matches)
2493    }
2494
2495    /// Specifies the allowed "phase 2" inner authentication method when an EAP
2496    /// method that uses an inner TLS tunnel is specified in the #NMSetting8021x:eap
2497    /// property.  For TTLS this property selects one of the supported non-EAP
2498    /// inner methods: "pap", "chap", "mschap", "mschapv2" while
2499    /// #NMSetting8021x:phase2-autheap selects an EAP inner method.  For PEAP
2500    /// this selects an inner EAP method, one of: "gtc", "otp", "md5" and "tls".
2501    /// Each "phase 2" inner method requires specific parameters for successful
2502    /// authentication; see the wpa_supplicant documentation for more details.
2503    /// Both #NMSetting8021x:phase2-auth and #NMSetting8021x:phase2-autheap cannot
2504    /// be specified.
2505    #[doc(alias = "phase2-auth")]
2506    pub fn set_phase2_auth(&self, phase2_auth: Option<&str>) {
2507        ObjectExt::set_property(self, "phase2-auth", phase2_auth)
2508    }
2509
2510    /// Specifies the allowed "phase 2" inner EAP-based authentication method
2511    /// when TTLS is specified in the #NMSetting8021x:eap property.  Recognized
2512    /// EAP-based "phase 2" methods are "md5", "mschapv2", "otp", "gtc", and
2513    /// "tls". Each "phase 2" inner method requires specific parameters for
2514    /// successful authentication; see the wpa_supplicant documentation for
2515    /// more details.
2516    #[doc(alias = "phase2-autheap")]
2517    pub fn set_phase2_autheap(&self, phase2_autheap: Option<&str>) {
2518        ObjectExt::set_property(self, "phase2-autheap", phase2_autheap)
2519    }
2520
2521    //#[doc(alias = "phase2-ca-cert")]
2522    //pub fn phase2_ca_cert(&self) -> /*Ignored*/Option<glib::Bytes> {
2523    //    ObjectExt::property(self, "phase2-ca-cert")
2524    //}
2525
2526    /// The password used to access the "phase2" CA certificate stored in
2527    /// #NMSetting8021x:phase2-ca-cert property. Only makes sense if the certificate
2528    /// is stored on a PKCS#<!-- -->11 token that requires a login.
2529    #[cfg(feature = "v1_8")]
2530    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2531    #[doc(alias = "phase2-ca-cert-password")]
2532    pub fn set_phase2_ca_cert_password(&self, phase2_ca_cert_password: Option<&str>) {
2533        ObjectExt::set_property(self, "phase2-ca-cert-password", phase2_ca_cert_password)
2534    }
2535
2536    /// Flags indicating how to handle the #NMSetting8021x:phase2-ca-cert-password property.
2537    #[cfg(feature = "v1_8")]
2538    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2539    #[doc(alias = "phase2-ca-cert-password-flags")]
2540    pub fn set_phase2_ca_cert_password_flags(
2541        &self,
2542        phase2_ca_cert_password_flags: SettingSecretFlags,
2543    ) {
2544        ObjectExt::set_property(
2545            self,
2546            "phase2-ca-cert-password-flags",
2547            phase2_ca_cert_password_flags,
2548        )
2549    }
2550
2551    /// UTF-8 encoded path to a directory containing PEM or DER formatted
2552    /// certificates to be added to the verification chain in addition to the
2553    /// certificate specified in the #NMSetting8021x:phase2-ca-cert property.
2554    ///
2555    /// If NMSetting8021x:system-ca-certs is enabled and the built-in CA
2556    /// path is an existing directory, then this setting is ignored.
2557    #[doc(alias = "phase2-ca-path")]
2558    pub fn set_phase2_ca_path(&self, phase2_ca_path: Option<&str>) {
2559        ObjectExt::set_property(self, "phase2-ca-path", phase2_ca_path)
2560    }
2561
2562    //#[doc(alias = "phase2-client-cert")]
2563    //pub fn phase2_client_cert(&self) -> /*Ignored*/Option<glib::Bytes> {
2564    //    ObjectExt::property(self, "phase2-client-cert")
2565    //}
2566
2567    /// The password used to access the "phase2" client certificate stored in
2568    /// #NMSetting8021x:phase2-client-cert property. Only makes sense if the certificate
2569    /// is stored on a PKCS#<!-- -->11 token that requires a login.
2570    #[cfg(feature = "v1_8")]
2571    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2572    #[doc(alias = "phase2-client-cert-password")]
2573    pub fn set_phase2_client_cert_password(&self, phase2_client_cert_password: Option<&str>) {
2574        ObjectExt::set_property(
2575            self,
2576            "phase2-client-cert-password",
2577            phase2_client_cert_password,
2578        )
2579    }
2580
2581    /// Flags indicating how to handle the #NMSetting8021x:phase2-client-cert-password property.
2582    #[cfg(feature = "v1_8")]
2583    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2584    #[doc(alias = "phase2-client-cert-password-flags")]
2585    pub fn set_phase2_client_cert_password_flags(
2586        &self,
2587        phase2_client_cert_password_flags: SettingSecretFlags,
2588    ) {
2589        ObjectExt::set_property(
2590            self,
2591            "phase2-client-cert-password-flags",
2592            phase2_client_cert_password_flags,
2593        )
2594    }
2595
2596    /// Constraint for server domain name. If set, this list of FQDNs is used as
2597    /// a match requirement for dNSName element(s) of the certificate presented
2598    /// by the authentication server during the inner "phase 2" authentication.
2599    /// If a matching dNSName is found, this constraint is met.  If no dNSName
2600    /// values are present, this constraint is matched against SubjectName CN
2601    /// using the same comparison.
2602    /// Multiple valid FQDNs can be passed as a ";" delimited list.
2603    #[cfg(feature = "v1_24")]
2604    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
2605    #[doc(alias = "phase2-domain-match")]
2606    pub fn set_phase2_domain_match(&self, phase2_domain_match: Option<&str>) {
2607        ObjectExt::set_property(self, "phase2-domain-match", phase2_domain_match)
2608    }
2609
2610    /// Constraint for server domain name. If set, this FQDN is used as a suffix
2611    /// match requirement for dNSName element(s) of the certificate presented by
2612    /// the authentication server during the inner "phase 2" authentication.  If
2613    /// a matching dNSName is found, this constraint is met.  If no dNSName
2614    /// values are present, this constraint is matched against SubjectName CN
2615    /// using same suffix match comparison.
2616    /// Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited
2617    /// list.
2618    #[cfg(feature = "v1_2")]
2619    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
2620    #[doc(alias = "phase2-domain-suffix-match")]
2621    pub fn set_phase2_domain_suffix_match(&self, phase2_domain_suffix_match: Option<&str>) {
2622        ObjectExt::set_property(
2623            self,
2624            "phase2-domain-suffix-match",
2625            phase2_domain_suffix_match,
2626        )
2627    }
2628
2629    //#[doc(alias = "phase2-private-key")]
2630    //pub fn phase2_private_key(&self) -> /*Ignored*/Option<glib::Bytes> {
2631    //    ObjectExt::property(self, "phase2-private-key")
2632    //}
2633
2634    /// The password used to decrypt the "phase 2" private key specified in the
2635    /// #NMSetting8021x:phase2-private-key property when the private key either
2636    /// uses the path scheme, or is a PKCS#<!-- -->12 format key.  Setting this
2637    /// property directly is not generally necessary except when returning
2638    /// secrets to NetworkManager; it is generally set automatically when setting
2639    /// the private key by the nm_setting_802_1x_set_phase2_private_key()
2640    /// function.
2641    #[doc(alias = "phase2-private-key-password")]
2642    pub fn set_phase2_private_key_password(&self, phase2_private_key_password: Option<&str>) {
2643        ObjectExt::set_property(
2644            self,
2645            "phase2-private-key-password",
2646            phase2_private_key_password,
2647        )
2648    }
2649
2650    /// Flags indicating how to handle the
2651    /// #NMSetting8021x:phase2-private-key-password property.
2652    #[doc(alias = "phase2-private-key-password-flags")]
2653    pub fn set_phase2_private_key_password_flags(
2654        &self,
2655        phase2_private_key_password_flags: SettingSecretFlags,
2656    ) {
2657        ObjectExt::set_property(
2658            self,
2659            "phase2-private-key-password-flags",
2660            phase2_private_key_password_flags,
2661        )
2662    }
2663
2664    /// Substring to be matched against the subject of the certificate presented
2665    /// by the authentication server during the inner "phase 2"
2666    /// authentication. When unset, no verification of the authentication server
2667    /// certificate's subject is performed. This property provides little security,
2668    /// if any, and should not be used.
2669    ///
2670    /// # Deprecated since 1.2
2671    ///
2672    /// Use #NMSetting8021x:phase2-domain-suffix-match instead.
2673    #[cfg_attr(feature = "v1_2", deprecated = "Since 1.2")]
2674    #[doc(alias = "phase2-subject-match")]
2675    pub fn set_phase2_subject_match(&self, phase2_subject_match: Option<&str>) {
2676        ObjectExt::set_property(self, "phase2-subject-match", phase2_subject_match)
2677    }
2678
2679    /// PIN used for EAP authentication methods.
2680    pub fn set_pin(&self, pin: Option<&str>) {
2681        ObjectExt::set_property(self, "pin", pin)
2682    }
2683
2684    /// Flags indicating how to handle the #NMSetting8021x:pin property.
2685    #[doc(alias = "pin-flags")]
2686    pub fn set_pin_flags(&self, pin_flags: SettingSecretFlags) {
2687        ObjectExt::set_property(self, "pin-flags", pin_flags)
2688    }
2689
2690    //#[doc(alias = "private-key")]
2691    //pub fn private_key(&self) -> /*Ignored*/Option<glib::Bytes> {
2692    //    ObjectExt::property(self, "private-key")
2693    //}
2694
2695    /// The password used to decrypt the private key specified in the
2696    /// #NMSetting8021x:private-key property when the private key either uses the
2697    /// path scheme, or if the private key is a PKCS#<!-- -->12 format key.  Setting this
2698    /// property directly is not generally necessary except when returning
2699    /// secrets to NetworkManager; it is generally set automatically when setting
2700    /// the private key by the nm_setting_802_1x_set_private_key() function.
2701    #[doc(alias = "private-key-password")]
2702    pub fn set_private_key_password(&self, private_key_password: Option<&str>) {
2703        ObjectExt::set_property(self, "private-key-password", private_key_password)
2704    }
2705
2706    /// Flags indicating how to handle the #NMSetting8021x:private-key-password
2707    /// property.
2708    #[doc(alias = "private-key-password-flags")]
2709    pub fn set_private_key_password_flags(&self, private_key_password_flags: SettingSecretFlags) {
2710        ObjectExt::set_property(
2711            self,
2712            "private-key-password-flags",
2713            private_key_password_flags,
2714        )
2715    }
2716
2717    /// Substring to be matched against the subject of the certificate presented
2718    /// by the authentication server. When unset, no verification of the
2719    /// authentication server certificate's subject is performed. This property
2720    /// provides little security, if any, and should not be used.
2721    ///
2722    /// # Deprecated since 1.2
2723    ///
2724    /// Use #NMSetting8021x:phase2-domain-suffix-match instead.
2725    #[cfg_attr(feature = "v1_2", deprecated = "Since 1.2")]
2726    #[doc(alias = "subject-match")]
2727    pub fn set_subject_match(&self, subject_match: Option<&str>) {
2728        ObjectExt::set_property(self, "subject-match", subject_match)
2729    }
2730
2731    /// When [`true`], overrides the #NMSetting8021x:ca-path and
2732    /// #NMSetting8021x:phase2-ca-path properties using the system CA directory
2733    /// specified at configure time with the --system-ca-path switch.  The
2734    /// certificates in this directory are added to the verification chain in
2735    /// addition to any certificates specified by the #NMSetting8021x:ca-cert and
2736    /// #NMSetting8021x:phase2-ca-cert properties. If the path provided with
2737    /// --system-ca-path is rather a file name (bundle of trusted CA certificates),
2738    /// it overrides #NMSetting8021x:ca-cert and #NMSetting8021x:phase2-ca-cert
2739    /// properties instead (sets ca_cert/ca_cert2 options for wpa_supplicant).
2740    #[doc(alias = "system-ca-certs")]
2741    pub fn set_system_ca_certs(&self, system_ca_certs: bool) {
2742        ObjectExt::set_property(self, "system-ca-certs", system_ca_certs)
2743    }
2744
2745    //#[cfg(feature = "v1_2")]
2746    //#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
2747    //#[doc(alias = "nm_setting_802_1x_check_cert_scheme")]
2748    //pub fn check_cert_scheme(pdata: /*Unimplemented*/Option<Basic: Pointer>, length: usize) -> Result<Setting8021xCKScheme, glib::Error> {
2749    //    unsafe { TODO: call ffi:nm_setting_802_1x_check_cert_scheme() }
2750    //}
2751
2752    #[doc(alias = "altsubject-matches")]
2753    pub fn connect_altsubject_matches_notify<F: Fn(&Self) + 'static>(
2754        &self,
2755        f: F,
2756    ) -> SignalHandlerId {
2757        unsafe extern "C" fn notify_altsubject_matches_trampoline<
2758            F: Fn(&Setting8021x) + 'static,
2759        >(
2760            this: *mut ffi::NMSetting8021x,
2761            _param_spec: glib::ffi::gpointer,
2762            f: glib::ffi::gpointer,
2763        ) {
2764            let f: &F = &*(f as *const F);
2765            f(&from_glib_borrow(this))
2766        }
2767        unsafe {
2768            let f: Box_<F> = Box_::new(f);
2769            connect_raw(
2770                self.as_ptr() as *mut _,
2771                c"notify::altsubject-matches".as_ptr() as *const _,
2772                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2773                    notify_altsubject_matches_trampoline::<F> as *const (),
2774                )),
2775                Box_::into_raw(f),
2776            )
2777        }
2778    }
2779
2780    #[doc(alias = "anonymous-identity")]
2781    pub fn connect_anonymous_identity_notify<F: Fn(&Self) + 'static>(
2782        &self,
2783        f: F,
2784    ) -> SignalHandlerId {
2785        unsafe extern "C" fn notify_anonymous_identity_trampoline<
2786            F: Fn(&Setting8021x) + 'static,
2787        >(
2788            this: *mut ffi::NMSetting8021x,
2789            _param_spec: glib::ffi::gpointer,
2790            f: glib::ffi::gpointer,
2791        ) {
2792            let f: &F = &*(f as *const F);
2793            f(&from_glib_borrow(this))
2794        }
2795        unsafe {
2796            let f: Box_<F> = Box_::new(f);
2797            connect_raw(
2798                self.as_ptr() as *mut _,
2799                c"notify::anonymous-identity".as_ptr() as *const _,
2800                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2801                    notify_anonymous_identity_trampoline::<F> as *const (),
2802                )),
2803                Box_::into_raw(f),
2804            )
2805        }
2806    }
2807
2808    #[cfg(feature = "v1_8")]
2809    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2810    #[doc(alias = "auth-timeout")]
2811    pub fn connect_auth_timeout_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2812        unsafe extern "C" fn notify_auth_timeout_trampoline<F: Fn(&Setting8021x) + 'static>(
2813            this: *mut ffi::NMSetting8021x,
2814            _param_spec: glib::ffi::gpointer,
2815            f: glib::ffi::gpointer,
2816        ) {
2817            let f: &F = &*(f as *const F);
2818            f(&from_glib_borrow(this))
2819        }
2820        unsafe {
2821            let f: Box_<F> = Box_::new(f);
2822            connect_raw(
2823                self.as_ptr() as *mut _,
2824                c"notify::auth-timeout".as_ptr() as *const _,
2825                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2826                    notify_auth_timeout_trampoline::<F> as *const (),
2827                )),
2828                Box_::into_raw(f),
2829            )
2830        }
2831    }
2832
2833    #[doc(alias = "ca-cert")]
2834    pub fn connect_ca_cert_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2835        unsafe extern "C" fn notify_ca_cert_trampoline<F: Fn(&Setting8021x) + 'static>(
2836            this: *mut ffi::NMSetting8021x,
2837            _param_spec: glib::ffi::gpointer,
2838            f: glib::ffi::gpointer,
2839        ) {
2840            let f: &F = &*(f as *const F);
2841            f(&from_glib_borrow(this))
2842        }
2843        unsafe {
2844            let f: Box_<F> = Box_::new(f);
2845            connect_raw(
2846                self.as_ptr() as *mut _,
2847                c"notify::ca-cert".as_ptr() as *const _,
2848                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2849                    notify_ca_cert_trampoline::<F> as *const (),
2850                )),
2851                Box_::into_raw(f),
2852            )
2853        }
2854    }
2855
2856    #[cfg(feature = "v1_8")]
2857    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2858    #[doc(alias = "ca-cert-password")]
2859    pub fn connect_ca_cert_password_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2860        unsafe extern "C" fn notify_ca_cert_password_trampoline<F: Fn(&Setting8021x) + 'static>(
2861            this: *mut ffi::NMSetting8021x,
2862            _param_spec: glib::ffi::gpointer,
2863            f: glib::ffi::gpointer,
2864        ) {
2865            let f: &F = &*(f as *const F);
2866            f(&from_glib_borrow(this))
2867        }
2868        unsafe {
2869            let f: Box_<F> = Box_::new(f);
2870            connect_raw(
2871                self.as_ptr() as *mut _,
2872                c"notify::ca-cert-password".as_ptr() as *const _,
2873                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2874                    notify_ca_cert_password_trampoline::<F> as *const (),
2875                )),
2876                Box_::into_raw(f),
2877            )
2878        }
2879    }
2880
2881    #[cfg(feature = "v1_8")]
2882    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2883    #[doc(alias = "ca-cert-password-flags")]
2884    pub fn connect_ca_cert_password_flags_notify<F: Fn(&Self) + 'static>(
2885        &self,
2886        f: F,
2887    ) -> SignalHandlerId {
2888        unsafe extern "C" fn notify_ca_cert_password_flags_trampoline<
2889            F: Fn(&Setting8021x) + 'static,
2890        >(
2891            this: *mut ffi::NMSetting8021x,
2892            _param_spec: glib::ffi::gpointer,
2893            f: glib::ffi::gpointer,
2894        ) {
2895            let f: &F = &*(f as *const F);
2896            f(&from_glib_borrow(this))
2897        }
2898        unsafe {
2899            let f: Box_<F> = Box_::new(f);
2900            connect_raw(
2901                self.as_ptr() as *mut _,
2902                c"notify::ca-cert-password-flags".as_ptr() as *const _,
2903                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2904                    notify_ca_cert_password_flags_trampoline::<F> as *const (),
2905                )),
2906                Box_::into_raw(f),
2907            )
2908        }
2909    }
2910
2911    #[doc(alias = "ca-path")]
2912    pub fn connect_ca_path_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2913        unsafe extern "C" fn notify_ca_path_trampoline<F: Fn(&Setting8021x) + 'static>(
2914            this: *mut ffi::NMSetting8021x,
2915            _param_spec: glib::ffi::gpointer,
2916            f: glib::ffi::gpointer,
2917        ) {
2918            let f: &F = &*(f as *const F);
2919            f(&from_glib_borrow(this))
2920        }
2921        unsafe {
2922            let f: Box_<F> = Box_::new(f);
2923            connect_raw(
2924                self.as_ptr() as *mut _,
2925                c"notify::ca-path".as_ptr() as *const _,
2926                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2927                    notify_ca_path_trampoline::<F> as *const (),
2928                )),
2929                Box_::into_raw(f),
2930            )
2931        }
2932    }
2933
2934    #[doc(alias = "client-cert")]
2935    pub fn connect_client_cert_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2936        unsafe extern "C" fn notify_client_cert_trampoline<F: Fn(&Setting8021x) + 'static>(
2937            this: *mut ffi::NMSetting8021x,
2938            _param_spec: glib::ffi::gpointer,
2939            f: glib::ffi::gpointer,
2940        ) {
2941            let f: &F = &*(f as *const F);
2942            f(&from_glib_borrow(this))
2943        }
2944        unsafe {
2945            let f: Box_<F> = Box_::new(f);
2946            connect_raw(
2947                self.as_ptr() as *mut _,
2948                c"notify::client-cert".as_ptr() as *const _,
2949                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2950                    notify_client_cert_trampoline::<F> as *const (),
2951                )),
2952                Box_::into_raw(f),
2953            )
2954        }
2955    }
2956
2957    #[cfg(feature = "v1_8")]
2958    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2959    #[doc(alias = "client-cert-password")]
2960    pub fn connect_client_cert_password_notify<F: Fn(&Self) + 'static>(
2961        &self,
2962        f: F,
2963    ) -> SignalHandlerId {
2964        unsafe extern "C" fn notify_client_cert_password_trampoline<
2965            F: Fn(&Setting8021x) + 'static,
2966        >(
2967            this: *mut ffi::NMSetting8021x,
2968            _param_spec: glib::ffi::gpointer,
2969            f: glib::ffi::gpointer,
2970        ) {
2971            let f: &F = &*(f as *const F);
2972            f(&from_glib_borrow(this))
2973        }
2974        unsafe {
2975            let f: Box_<F> = Box_::new(f);
2976            connect_raw(
2977                self.as_ptr() as *mut _,
2978                c"notify::client-cert-password".as_ptr() as *const _,
2979                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2980                    notify_client_cert_password_trampoline::<F> as *const (),
2981                )),
2982                Box_::into_raw(f),
2983            )
2984        }
2985    }
2986
2987    #[cfg(feature = "v1_8")]
2988    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2989    #[doc(alias = "client-cert-password-flags")]
2990    pub fn connect_client_cert_password_flags_notify<F: Fn(&Self) + 'static>(
2991        &self,
2992        f: F,
2993    ) -> SignalHandlerId {
2994        unsafe extern "C" fn notify_client_cert_password_flags_trampoline<
2995            F: Fn(&Setting8021x) + 'static,
2996        >(
2997            this: *mut ffi::NMSetting8021x,
2998            _param_spec: glib::ffi::gpointer,
2999            f: glib::ffi::gpointer,
3000        ) {
3001            let f: &F = &*(f as *const F);
3002            f(&from_glib_borrow(this))
3003        }
3004        unsafe {
3005            let f: Box_<F> = Box_::new(f);
3006            connect_raw(
3007                self.as_ptr() as *mut _,
3008                c"notify::client-cert-password-flags".as_ptr() as *const _,
3009                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3010                    notify_client_cert_password_flags_trampoline::<F> as *const (),
3011                )),
3012                Box_::into_raw(f),
3013            )
3014        }
3015    }
3016
3017    #[cfg(feature = "v1_24")]
3018    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
3019    #[doc(alias = "domain-match")]
3020    pub fn connect_domain_match_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3021        unsafe extern "C" fn notify_domain_match_trampoline<F: Fn(&Setting8021x) + 'static>(
3022            this: *mut ffi::NMSetting8021x,
3023            _param_spec: glib::ffi::gpointer,
3024            f: glib::ffi::gpointer,
3025        ) {
3026            let f: &F = &*(f as *const F);
3027            f(&from_glib_borrow(this))
3028        }
3029        unsafe {
3030            let f: Box_<F> = Box_::new(f);
3031            connect_raw(
3032                self.as_ptr() as *mut _,
3033                c"notify::domain-match".as_ptr() as *const _,
3034                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3035                    notify_domain_match_trampoline::<F> as *const (),
3036                )),
3037                Box_::into_raw(f),
3038            )
3039        }
3040    }
3041
3042    #[cfg(feature = "v1_2")]
3043    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3044    #[doc(alias = "domain-suffix-match")]
3045    pub fn connect_domain_suffix_match_notify<F: Fn(&Self) + 'static>(
3046        &self,
3047        f: F,
3048    ) -> SignalHandlerId {
3049        unsafe extern "C" fn notify_domain_suffix_match_trampoline<
3050            F: Fn(&Setting8021x) + 'static,
3051        >(
3052            this: *mut ffi::NMSetting8021x,
3053            _param_spec: glib::ffi::gpointer,
3054            f: glib::ffi::gpointer,
3055        ) {
3056            let f: &F = &*(f as *const F);
3057            f(&from_glib_borrow(this))
3058        }
3059        unsafe {
3060            let f: Box_<F> = Box_::new(f);
3061            connect_raw(
3062                self.as_ptr() as *mut _,
3063                c"notify::domain-suffix-match".as_ptr() as *const _,
3064                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3065                    notify_domain_suffix_match_trampoline::<F> as *const (),
3066                )),
3067                Box_::into_raw(f),
3068            )
3069        }
3070    }
3071
3072    #[doc(alias = "eap")]
3073    pub fn connect_eap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3074        unsafe extern "C" fn notify_eap_trampoline<F: Fn(&Setting8021x) + 'static>(
3075            this: *mut ffi::NMSetting8021x,
3076            _param_spec: glib::ffi::gpointer,
3077            f: glib::ffi::gpointer,
3078        ) {
3079            let f: &F = &*(f as *const F);
3080            f(&from_glib_borrow(this))
3081        }
3082        unsafe {
3083            let f: Box_<F> = Box_::new(f);
3084            connect_raw(
3085                self.as_ptr() as *mut _,
3086                c"notify::eap".as_ptr() as *const _,
3087                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3088                    notify_eap_trampoline::<F> as *const (),
3089                )),
3090                Box_::into_raw(f),
3091            )
3092        }
3093    }
3094
3095    #[doc(alias = "identity")]
3096    pub fn connect_identity_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3097        unsafe extern "C" fn notify_identity_trampoline<F: Fn(&Setting8021x) + 'static>(
3098            this: *mut ffi::NMSetting8021x,
3099            _param_spec: glib::ffi::gpointer,
3100            f: glib::ffi::gpointer,
3101        ) {
3102            let f: &F = &*(f as *const F);
3103            f(&from_glib_borrow(this))
3104        }
3105        unsafe {
3106            let f: Box_<F> = Box_::new(f);
3107            connect_raw(
3108                self.as_ptr() as *mut _,
3109                c"notify::identity".as_ptr() as *const _,
3110                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3111                    notify_identity_trampoline::<F> as *const (),
3112                )),
3113                Box_::into_raw(f),
3114            )
3115        }
3116    }
3117
3118    #[cfg(feature = "v1_48")]
3119    #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
3120    #[doc(alias = "openssl-ciphers")]
3121    pub fn connect_openssl_ciphers_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3122        unsafe extern "C" fn notify_openssl_ciphers_trampoline<F: Fn(&Setting8021x) + 'static>(
3123            this: *mut ffi::NMSetting8021x,
3124            _param_spec: glib::ffi::gpointer,
3125            f: glib::ffi::gpointer,
3126        ) {
3127            let f: &F = &*(f as *const F);
3128            f(&from_glib_borrow(this))
3129        }
3130        unsafe {
3131            let f: Box_<F> = Box_::new(f);
3132            connect_raw(
3133                self.as_ptr() as *mut _,
3134                c"notify::openssl-ciphers".as_ptr() as *const _,
3135                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3136                    notify_openssl_ciphers_trampoline::<F> as *const (),
3137                )),
3138                Box_::into_raw(f),
3139            )
3140        }
3141    }
3142
3143    #[cfg(feature = "v1_22")]
3144    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
3145    #[doc(alias = "optional")]
3146    pub fn connect_optional_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3147        unsafe extern "C" fn notify_optional_trampoline<F: Fn(&Setting8021x) + 'static>(
3148            this: *mut ffi::NMSetting8021x,
3149            _param_spec: glib::ffi::gpointer,
3150            f: glib::ffi::gpointer,
3151        ) {
3152            let f: &F = &*(f as *const F);
3153            f(&from_glib_borrow(this))
3154        }
3155        unsafe {
3156            let f: Box_<F> = Box_::new(f);
3157            connect_raw(
3158                self.as_ptr() as *mut _,
3159                c"notify::optional".as_ptr() as *const _,
3160                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3161                    notify_optional_trampoline::<F> as *const (),
3162                )),
3163                Box_::into_raw(f),
3164            )
3165        }
3166    }
3167
3168    #[doc(alias = "pac-file")]
3169    pub fn connect_pac_file_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3170        unsafe extern "C" fn notify_pac_file_trampoline<F: Fn(&Setting8021x) + 'static>(
3171            this: *mut ffi::NMSetting8021x,
3172            _param_spec: glib::ffi::gpointer,
3173            f: glib::ffi::gpointer,
3174        ) {
3175            let f: &F = &*(f as *const F);
3176            f(&from_glib_borrow(this))
3177        }
3178        unsafe {
3179            let f: Box_<F> = Box_::new(f);
3180            connect_raw(
3181                self.as_ptr() as *mut _,
3182                c"notify::pac-file".as_ptr() as *const _,
3183                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3184                    notify_pac_file_trampoline::<F> as *const (),
3185                )),
3186                Box_::into_raw(f),
3187            )
3188        }
3189    }
3190
3191    #[doc(alias = "password")]
3192    pub fn connect_password_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3193        unsafe extern "C" fn notify_password_trampoline<F: Fn(&Setting8021x) + 'static>(
3194            this: *mut ffi::NMSetting8021x,
3195            _param_spec: glib::ffi::gpointer,
3196            f: glib::ffi::gpointer,
3197        ) {
3198            let f: &F = &*(f as *const F);
3199            f(&from_glib_borrow(this))
3200        }
3201        unsafe {
3202            let f: Box_<F> = Box_::new(f);
3203            connect_raw(
3204                self.as_ptr() as *mut _,
3205                c"notify::password".as_ptr() as *const _,
3206                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3207                    notify_password_trampoline::<F> as *const (),
3208                )),
3209                Box_::into_raw(f),
3210            )
3211        }
3212    }
3213
3214    #[doc(alias = "password-flags")]
3215    pub fn connect_password_flags_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3216        unsafe extern "C" fn notify_password_flags_trampoline<F: Fn(&Setting8021x) + 'static>(
3217            this: *mut ffi::NMSetting8021x,
3218            _param_spec: glib::ffi::gpointer,
3219            f: glib::ffi::gpointer,
3220        ) {
3221            let f: &F = &*(f as *const F);
3222            f(&from_glib_borrow(this))
3223        }
3224        unsafe {
3225            let f: Box_<F> = Box_::new(f);
3226            connect_raw(
3227                self.as_ptr() as *mut _,
3228                c"notify::password-flags".as_ptr() as *const _,
3229                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3230                    notify_password_flags_trampoline::<F> as *const (),
3231                )),
3232                Box_::into_raw(f),
3233            )
3234        }
3235    }
3236
3237    #[doc(alias = "password-raw")]
3238    pub fn connect_password_raw_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3239        unsafe extern "C" fn notify_password_raw_trampoline<F: Fn(&Setting8021x) + 'static>(
3240            this: *mut ffi::NMSetting8021x,
3241            _param_spec: glib::ffi::gpointer,
3242            f: glib::ffi::gpointer,
3243        ) {
3244            let f: &F = &*(f as *const F);
3245            f(&from_glib_borrow(this))
3246        }
3247        unsafe {
3248            let f: Box_<F> = Box_::new(f);
3249            connect_raw(
3250                self.as_ptr() as *mut _,
3251                c"notify::password-raw".as_ptr() as *const _,
3252                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3253                    notify_password_raw_trampoline::<F> as *const (),
3254                )),
3255                Box_::into_raw(f),
3256            )
3257        }
3258    }
3259
3260    #[doc(alias = "password-raw-flags")]
3261    pub fn connect_password_raw_flags_notify<F: Fn(&Self) + 'static>(
3262        &self,
3263        f: F,
3264    ) -> SignalHandlerId {
3265        unsafe extern "C" fn notify_password_raw_flags_trampoline<
3266            F: Fn(&Setting8021x) + 'static,
3267        >(
3268            this: *mut ffi::NMSetting8021x,
3269            _param_spec: glib::ffi::gpointer,
3270            f: glib::ffi::gpointer,
3271        ) {
3272            let f: &F = &*(f as *const F);
3273            f(&from_glib_borrow(this))
3274        }
3275        unsafe {
3276            let f: Box_<F> = Box_::new(f);
3277            connect_raw(
3278                self.as_ptr() as *mut _,
3279                c"notify::password-raw-flags".as_ptr() as *const _,
3280                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3281                    notify_password_raw_flags_trampoline::<F> as *const (),
3282                )),
3283                Box_::into_raw(f),
3284            )
3285        }
3286    }
3287
3288    #[cfg(feature = "v1_8")]
3289    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
3290    #[doc(alias = "phase1-auth-flags")]
3291    pub fn connect_phase1_auth_flags_notify<F: Fn(&Self) + 'static>(
3292        &self,
3293        f: F,
3294    ) -> SignalHandlerId {
3295        unsafe extern "C" fn notify_phase1_auth_flags_trampoline<F: Fn(&Setting8021x) + 'static>(
3296            this: *mut ffi::NMSetting8021x,
3297            _param_spec: glib::ffi::gpointer,
3298            f: glib::ffi::gpointer,
3299        ) {
3300            let f: &F = &*(f as *const F);
3301            f(&from_glib_borrow(this))
3302        }
3303        unsafe {
3304            let f: Box_<F> = Box_::new(f);
3305            connect_raw(
3306                self.as_ptr() as *mut _,
3307                c"notify::phase1-auth-flags".as_ptr() as *const _,
3308                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3309                    notify_phase1_auth_flags_trampoline::<F> as *const (),
3310                )),
3311                Box_::into_raw(f),
3312            )
3313        }
3314    }
3315
3316    #[doc(alias = "phase1-fast-provisioning")]
3317    pub fn connect_phase1_fast_provisioning_notify<F: Fn(&Self) + 'static>(
3318        &self,
3319        f: F,
3320    ) -> SignalHandlerId {
3321        unsafe extern "C" fn notify_phase1_fast_provisioning_trampoline<
3322            F: Fn(&Setting8021x) + 'static,
3323        >(
3324            this: *mut ffi::NMSetting8021x,
3325            _param_spec: glib::ffi::gpointer,
3326            f: glib::ffi::gpointer,
3327        ) {
3328            let f: &F = &*(f as *const F);
3329            f(&from_glib_borrow(this))
3330        }
3331        unsafe {
3332            let f: Box_<F> = Box_::new(f);
3333            connect_raw(
3334                self.as_ptr() as *mut _,
3335                c"notify::phase1-fast-provisioning".as_ptr() as *const _,
3336                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3337                    notify_phase1_fast_provisioning_trampoline::<F> as *const (),
3338                )),
3339                Box_::into_raw(f),
3340            )
3341        }
3342    }
3343
3344    #[doc(alias = "phase1-peaplabel")]
3345    pub fn connect_phase1_peaplabel_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3346        unsafe extern "C" fn notify_phase1_peaplabel_trampoline<F: Fn(&Setting8021x) + 'static>(
3347            this: *mut ffi::NMSetting8021x,
3348            _param_spec: glib::ffi::gpointer,
3349            f: glib::ffi::gpointer,
3350        ) {
3351            let f: &F = &*(f as *const F);
3352            f(&from_glib_borrow(this))
3353        }
3354        unsafe {
3355            let f: Box_<F> = Box_::new(f);
3356            connect_raw(
3357                self.as_ptr() as *mut _,
3358                c"notify::phase1-peaplabel".as_ptr() as *const _,
3359                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3360                    notify_phase1_peaplabel_trampoline::<F> as *const (),
3361                )),
3362                Box_::into_raw(f),
3363            )
3364        }
3365    }
3366
3367    #[doc(alias = "phase1-peapver")]
3368    pub fn connect_phase1_peapver_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3369        unsafe extern "C" fn notify_phase1_peapver_trampoline<F: Fn(&Setting8021x) + 'static>(
3370            this: *mut ffi::NMSetting8021x,
3371            _param_spec: glib::ffi::gpointer,
3372            f: glib::ffi::gpointer,
3373        ) {
3374            let f: &F = &*(f as *const F);
3375            f(&from_glib_borrow(this))
3376        }
3377        unsafe {
3378            let f: Box_<F> = Box_::new(f);
3379            connect_raw(
3380                self.as_ptr() as *mut _,
3381                c"notify::phase1-peapver".as_ptr() as *const _,
3382                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3383                    notify_phase1_peapver_trampoline::<F> as *const (),
3384                )),
3385                Box_::into_raw(f),
3386            )
3387        }
3388    }
3389
3390    #[doc(alias = "phase2-altsubject-matches")]
3391    pub fn connect_phase2_altsubject_matches_notify<F: Fn(&Self) + 'static>(
3392        &self,
3393        f: F,
3394    ) -> SignalHandlerId {
3395        unsafe extern "C" fn notify_phase2_altsubject_matches_trampoline<
3396            F: Fn(&Setting8021x) + 'static,
3397        >(
3398            this: *mut ffi::NMSetting8021x,
3399            _param_spec: glib::ffi::gpointer,
3400            f: glib::ffi::gpointer,
3401        ) {
3402            let f: &F = &*(f as *const F);
3403            f(&from_glib_borrow(this))
3404        }
3405        unsafe {
3406            let f: Box_<F> = Box_::new(f);
3407            connect_raw(
3408                self.as_ptr() as *mut _,
3409                c"notify::phase2-altsubject-matches".as_ptr() as *const _,
3410                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3411                    notify_phase2_altsubject_matches_trampoline::<F> as *const (),
3412                )),
3413                Box_::into_raw(f),
3414            )
3415        }
3416    }
3417
3418    #[doc(alias = "phase2-auth")]
3419    pub fn connect_phase2_auth_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3420        unsafe extern "C" fn notify_phase2_auth_trampoline<F: Fn(&Setting8021x) + 'static>(
3421            this: *mut ffi::NMSetting8021x,
3422            _param_spec: glib::ffi::gpointer,
3423            f: glib::ffi::gpointer,
3424        ) {
3425            let f: &F = &*(f as *const F);
3426            f(&from_glib_borrow(this))
3427        }
3428        unsafe {
3429            let f: Box_<F> = Box_::new(f);
3430            connect_raw(
3431                self.as_ptr() as *mut _,
3432                c"notify::phase2-auth".as_ptr() as *const _,
3433                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3434                    notify_phase2_auth_trampoline::<F> as *const (),
3435                )),
3436                Box_::into_raw(f),
3437            )
3438        }
3439    }
3440
3441    #[doc(alias = "phase2-autheap")]
3442    pub fn connect_phase2_autheap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3443        unsafe extern "C" fn notify_phase2_autheap_trampoline<F: Fn(&Setting8021x) + 'static>(
3444            this: *mut ffi::NMSetting8021x,
3445            _param_spec: glib::ffi::gpointer,
3446            f: glib::ffi::gpointer,
3447        ) {
3448            let f: &F = &*(f as *const F);
3449            f(&from_glib_borrow(this))
3450        }
3451        unsafe {
3452            let f: Box_<F> = Box_::new(f);
3453            connect_raw(
3454                self.as_ptr() as *mut _,
3455                c"notify::phase2-autheap".as_ptr() as *const _,
3456                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3457                    notify_phase2_autheap_trampoline::<F> as *const (),
3458                )),
3459                Box_::into_raw(f),
3460            )
3461        }
3462    }
3463
3464    #[doc(alias = "phase2-ca-cert")]
3465    pub fn connect_phase2_ca_cert_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3466        unsafe extern "C" fn notify_phase2_ca_cert_trampoline<F: Fn(&Setting8021x) + 'static>(
3467            this: *mut ffi::NMSetting8021x,
3468            _param_spec: glib::ffi::gpointer,
3469            f: glib::ffi::gpointer,
3470        ) {
3471            let f: &F = &*(f as *const F);
3472            f(&from_glib_borrow(this))
3473        }
3474        unsafe {
3475            let f: Box_<F> = Box_::new(f);
3476            connect_raw(
3477                self.as_ptr() as *mut _,
3478                c"notify::phase2-ca-cert".as_ptr() as *const _,
3479                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3480                    notify_phase2_ca_cert_trampoline::<F> as *const (),
3481                )),
3482                Box_::into_raw(f),
3483            )
3484        }
3485    }
3486
3487    #[cfg(feature = "v1_8")]
3488    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
3489    #[doc(alias = "phase2-ca-cert-password")]
3490    pub fn connect_phase2_ca_cert_password_notify<F: Fn(&Self) + 'static>(
3491        &self,
3492        f: F,
3493    ) -> SignalHandlerId {
3494        unsafe extern "C" fn notify_phase2_ca_cert_password_trampoline<
3495            F: Fn(&Setting8021x) + 'static,
3496        >(
3497            this: *mut ffi::NMSetting8021x,
3498            _param_spec: glib::ffi::gpointer,
3499            f: glib::ffi::gpointer,
3500        ) {
3501            let f: &F = &*(f as *const F);
3502            f(&from_glib_borrow(this))
3503        }
3504        unsafe {
3505            let f: Box_<F> = Box_::new(f);
3506            connect_raw(
3507                self.as_ptr() as *mut _,
3508                c"notify::phase2-ca-cert-password".as_ptr() as *const _,
3509                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3510                    notify_phase2_ca_cert_password_trampoline::<F> as *const (),
3511                )),
3512                Box_::into_raw(f),
3513            )
3514        }
3515    }
3516
3517    #[cfg(feature = "v1_8")]
3518    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
3519    #[doc(alias = "phase2-ca-cert-password-flags")]
3520    pub fn connect_phase2_ca_cert_password_flags_notify<F: Fn(&Self) + 'static>(
3521        &self,
3522        f: F,
3523    ) -> SignalHandlerId {
3524        unsafe extern "C" fn notify_phase2_ca_cert_password_flags_trampoline<
3525            F: Fn(&Setting8021x) + 'static,
3526        >(
3527            this: *mut ffi::NMSetting8021x,
3528            _param_spec: glib::ffi::gpointer,
3529            f: glib::ffi::gpointer,
3530        ) {
3531            let f: &F = &*(f as *const F);
3532            f(&from_glib_borrow(this))
3533        }
3534        unsafe {
3535            let f: Box_<F> = Box_::new(f);
3536            connect_raw(
3537                self.as_ptr() as *mut _,
3538                c"notify::phase2-ca-cert-password-flags".as_ptr() as *const _,
3539                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3540                    notify_phase2_ca_cert_password_flags_trampoline::<F> as *const (),
3541                )),
3542                Box_::into_raw(f),
3543            )
3544        }
3545    }
3546
3547    #[doc(alias = "phase2-ca-path")]
3548    pub fn connect_phase2_ca_path_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3549        unsafe extern "C" fn notify_phase2_ca_path_trampoline<F: Fn(&Setting8021x) + 'static>(
3550            this: *mut ffi::NMSetting8021x,
3551            _param_spec: glib::ffi::gpointer,
3552            f: glib::ffi::gpointer,
3553        ) {
3554            let f: &F = &*(f as *const F);
3555            f(&from_glib_borrow(this))
3556        }
3557        unsafe {
3558            let f: Box_<F> = Box_::new(f);
3559            connect_raw(
3560                self.as_ptr() as *mut _,
3561                c"notify::phase2-ca-path".as_ptr() as *const _,
3562                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3563                    notify_phase2_ca_path_trampoline::<F> as *const (),
3564                )),
3565                Box_::into_raw(f),
3566            )
3567        }
3568    }
3569
3570    #[doc(alias = "phase2-client-cert")]
3571    pub fn connect_phase2_client_cert_notify<F: Fn(&Self) + 'static>(
3572        &self,
3573        f: F,
3574    ) -> SignalHandlerId {
3575        unsafe extern "C" fn notify_phase2_client_cert_trampoline<
3576            F: Fn(&Setting8021x) + 'static,
3577        >(
3578            this: *mut ffi::NMSetting8021x,
3579            _param_spec: glib::ffi::gpointer,
3580            f: glib::ffi::gpointer,
3581        ) {
3582            let f: &F = &*(f as *const F);
3583            f(&from_glib_borrow(this))
3584        }
3585        unsafe {
3586            let f: Box_<F> = Box_::new(f);
3587            connect_raw(
3588                self.as_ptr() as *mut _,
3589                c"notify::phase2-client-cert".as_ptr() as *const _,
3590                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3591                    notify_phase2_client_cert_trampoline::<F> as *const (),
3592                )),
3593                Box_::into_raw(f),
3594            )
3595        }
3596    }
3597
3598    #[cfg(feature = "v1_8")]
3599    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
3600    #[doc(alias = "phase2-client-cert-password")]
3601    pub fn connect_phase2_client_cert_password_notify<F: Fn(&Self) + 'static>(
3602        &self,
3603        f: F,
3604    ) -> SignalHandlerId {
3605        unsafe extern "C" fn notify_phase2_client_cert_password_trampoline<
3606            F: Fn(&Setting8021x) + 'static,
3607        >(
3608            this: *mut ffi::NMSetting8021x,
3609            _param_spec: glib::ffi::gpointer,
3610            f: glib::ffi::gpointer,
3611        ) {
3612            let f: &F = &*(f as *const F);
3613            f(&from_glib_borrow(this))
3614        }
3615        unsafe {
3616            let f: Box_<F> = Box_::new(f);
3617            connect_raw(
3618                self.as_ptr() as *mut _,
3619                c"notify::phase2-client-cert-password".as_ptr() as *const _,
3620                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3621                    notify_phase2_client_cert_password_trampoline::<F> as *const (),
3622                )),
3623                Box_::into_raw(f),
3624            )
3625        }
3626    }
3627
3628    #[cfg(feature = "v1_8")]
3629    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
3630    #[doc(alias = "phase2-client-cert-password-flags")]
3631    pub fn connect_phase2_client_cert_password_flags_notify<F: Fn(&Self) + 'static>(
3632        &self,
3633        f: F,
3634    ) -> SignalHandlerId {
3635        unsafe extern "C" fn notify_phase2_client_cert_password_flags_trampoline<
3636            F: Fn(&Setting8021x) + 'static,
3637        >(
3638            this: *mut ffi::NMSetting8021x,
3639            _param_spec: glib::ffi::gpointer,
3640            f: glib::ffi::gpointer,
3641        ) {
3642            let f: &F = &*(f as *const F);
3643            f(&from_glib_borrow(this))
3644        }
3645        unsafe {
3646            let f: Box_<F> = Box_::new(f);
3647            connect_raw(
3648                self.as_ptr() as *mut _,
3649                c"notify::phase2-client-cert-password-flags".as_ptr() as *const _,
3650                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3651                    notify_phase2_client_cert_password_flags_trampoline::<F> as *const (),
3652                )),
3653                Box_::into_raw(f),
3654            )
3655        }
3656    }
3657
3658    #[cfg(feature = "v1_24")]
3659    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
3660    #[doc(alias = "phase2-domain-match")]
3661    pub fn connect_phase2_domain_match_notify<F: Fn(&Self) + 'static>(
3662        &self,
3663        f: F,
3664    ) -> SignalHandlerId {
3665        unsafe extern "C" fn notify_phase2_domain_match_trampoline<
3666            F: Fn(&Setting8021x) + 'static,
3667        >(
3668            this: *mut ffi::NMSetting8021x,
3669            _param_spec: glib::ffi::gpointer,
3670            f: glib::ffi::gpointer,
3671        ) {
3672            let f: &F = &*(f as *const F);
3673            f(&from_glib_borrow(this))
3674        }
3675        unsafe {
3676            let f: Box_<F> = Box_::new(f);
3677            connect_raw(
3678                self.as_ptr() as *mut _,
3679                c"notify::phase2-domain-match".as_ptr() as *const _,
3680                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3681                    notify_phase2_domain_match_trampoline::<F> as *const (),
3682                )),
3683                Box_::into_raw(f),
3684            )
3685        }
3686    }
3687
3688    #[cfg(feature = "v1_2")]
3689    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3690    #[doc(alias = "phase2-domain-suffix-match")]
3691    pub fn connect_phase2_domain_suffix_match_notify<F: Fn(&Self) + 'static>(
3692        &self,
3693        f: F,
3694    ) -> SignalHandlerId {
3695        unsafe extern "C" fn notify_phase2_domain_suffix_match_trampoline<
3696            F: Fn(&Setting8021x) + 'static,
3697        >(
3698            this: *mut ffi::NMSetting8021x,
3699            _param_spec: glib::ffi::gpointer,
3700            f: glib::ffi::gpointer,
3701        ) {
3702            let f: &F = &*(f as *const F);
3703            f(&from_glib_borrow(this))
3704        }
3705        unsafe {
3706            let f: Box_<F> = Box_::new(f);
3707            connect_raw(
3708                self.as_ptr() as *mut _,
3709                c"notify::phase2-domain-suffix-match".as_ptr() as *const _,
3710                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3711                    notify_phase2_domain_suffix_match_trampoline::<F> as *const (),
3712                )),
3713                Box_::into_raw(f),
3714            )
3715        }
3716    }
3717
3718    #[doc(alias = "phase2-private-key")]
3719    pub fn connect_phase2_private_key_notify<F: Fn(&Self) + 'static>(
3720        &self,
3721        f: F,
3722    ) -> SignalHandlerId {
3723        unsafe extern "C" fn notify_phase2_private_key_trampoline<
3724            F: Fn(&Setting8021x) + 'static,
3725        >(
3726            this: *mut ffi::NMSetting8021x,
3727            _param_spec: glib::ffi::gpointer,
3728            f: glib::ffi::gpointer,
3729        ) {
3730            let f: &F = &*(f as *const F);
3731            f(&from_glib_borrow(this))
3732        }
3733        unsafe {
3734            let f: Box_<F> = Box_::new(f);
3735            connect_raw(
3736                self.as_ptr() as *mut _,
3737                c"notify::phase2-private-key".as_ptr() as *const _,
3738                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3739                    notify_phase2_private_key_trampoline::<F> as *const (),
3740                )),
3741                Box_::into_raw(f),
3742            )
3743        }
3744    }
3745
3746    #[doc(alias = "phase2-private-key-password")]
3747    pub fn connect_phase2_private_key_password_notify<F: Fn(&Self) + 'static>(
3748        &self,
3749        f: F,
3750    ) -> SignalHandlerId {
3751        unsafe extern "C" fn notify_phase2_private_key_password_trampoline<
3752            F: Fn(&Setting8021x) + 'static,
3753        >(
3754            this: *mut ffi::NMSetting8021x,
3755            _param_spec: glib::ffi::gpointer,
3756            f: glib::ffi::gpointer,
3757        ) {
3758            let f: &F = &*(f as *const F);
3759            f(&from_glib_borrow(this))
3760        }
3761        unsafe {
3762            let f: Box_<F> = Box_::new(f);
3763            connect_raw(
3764                self.as_ptr() as *mut _,
3765                c"notify::phase2-private-key-password".as_ptr() as *const _,
3766                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3767                    notify_phase2_private_key_password_trampoline::<F> as *const (),
3768                )),
3769                Box_::into_raw(f),
3770            )
3771        }
3772    }
3773
3774    #[doc(alias = "phase2-private-key-password-flags")]
3775    pub fn connect_phase2_private_key_password_flags_notify<F: Fn(&Self) + 'static>(
3776        &self,
3777        f: F,
3778    ) -> SignalHandlerId {
3779        unsafe extern "C" fn notify_phase2_private_key_password_flags_trampoline<
3780            F: Fn(&Setting8021x) + 'static,
3781        >(
3782            this: *mut ffi::NMSetting8021x,
3783            _param_spec: glib::ffi::gpointer,
3784            f: glib::ffi::gpointer,
3785        ) {
3786            let f: &F = &*(f as *const F);
3787            f(&from_glib_borrow(this))
3788        }
3789        unsafe {
3790            let f: Box_<F> = Box_::new(f);
3791            connect_raw(
3792                self.as_ptr() as *mut _,
3793                c"notify::phase2-private-key-password-flags".as_ptr() as *const _,
3794                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3795                    notify_phase2_private_key_password_flags_trampoline::<F> as *const (),
3796                )),
3797                Box_::into_raw(f),
3798            )
3799        }
3800    }
3801
3802    #[cfg_attr(feature = "v1_2", deprecated = "Since 1.2")]
3803    #[doc(alias = "phase2-subject-match")]
3804    pub fn connect_phase2_subject_match_notify<F: Fn(&Self) + 'static>(
3805        &self,
3806        f: F,
3807    ) -> SignalHandlerId {
3808        unsafe extern "C" fn notify_phase2_subject_match_trampoline<
3809            F: Fn(&Setting8021x) + 'static,
3810        >(
3811            this: *mut ffi::NMSetting8021x,
3812            _param_spec: glib::ffi::gpointer,
3813            f: glib::ffi::gpointer,
3814        ) {
3815            let f: &F = &*(f as *const F);
3816            f(&from_glib_borrow(this))
3817        }
3818        unsafe {
3819            let f: Box_<F> = Box_::new(f);
3820            connect_raw(
3821                self.as_ptr() as *mut _,
3822                c"notify::phase2-subject-match".as_ptr() as *const _,
3823                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3824                    notify_phase2_subject_match_trampoline::<F> as *const (),
3825                )),
3826                Box_::into_raw(f),
3827            )
3828        }
3829    }
3830
3831    #[doc(alias = "pin")]
3832    pub fn connect_pin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3833        unsafe extern "C" fn notify_pin_trampoline<F: Fn(&Setting8021x) + 'static>(
3834            this: *mut ffi::NMSetting8021x,
3835            _param_spec: glib::ffi::gpointer,
3836            f: glib::ffi::gpointer,
3837        ) {
3838            let f: &F = &*(f as *const F);
3839            f(&from_glib_borrow(this))
3840        }
3841        unsafe {
3842            let f: Box_<F> = Box_::new(f);
3843            connect_raw(
3844                self.as_ptr() as *mut _,
3845                c"notify::pin".as_ptr() as *const _,
3846                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3847                    notify_pin_trampoline::<F> as *const (),
3848                )),
3849                Box_::into_raw(f),
3850            )
3851        }
3852    }
3853
3854    #[doc(alias = "pin-flags")]
3855    pub fn connect_pin_flags_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3856        unsafe extern "C" fn notify_pin_flags_trampoline<F: Fn(&Setting8021x) + 'static>(
3857            this: *mut ffi::NMSetting8021x,
3858            _param_spec: glib::ffi::gpointer,
3859            f: glib::ffi::gpointer,
3860        ) {
3861            let f: &F = &*(f as *const F);
3862            f(&from_glib_borrow(this))
3863        }
3864        unsafe {
3865            let f: Box_<F> = Box_::new(f);
3866            connect_raw(
3867                self.as_ptr() as *mut _,
3868                c"notify::pin-flags".as_ptr() as *const _,
3869                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3870                    notify_pin_flags_trampoline::<F> as *const (),
3871                )),
3872                Box_::into_raw(f),
3873            )
3874        }
3875    }
3876
3877    #[doc(alias = "private-key")]
3878    pub fn connect_private_key_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3879        unsafe extern "C" fn notify_private_key_trampoline<F: Fn(&Setting8021x) + 'static>(
3880            this: *mut ffi::NMSetting8021x,
3881            _param_spec: glib::ffi::gpointer,
3882            f: glib::ffi::gpointer,
3883        ) {
3884            let f: &F = &*(f as *const F);
3885            f(&from_glib_borrow(this))
3886        }
3887        unsafe {
3888            let f: Box_<F> = Box_::new(f);
3889            connect_raw(
3890                self.as_ptr() as *mut _,
3891                c"notify::private-key".as_ptr() as *const _,
3892                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3893                    notify_private_key_trampoline::<F> as *const (),
3894                )),
3895                Box_::into_raw(f),
3896            )
3897        }
3898    }
3899
3900    #[doc(alias = "private-key-password")]
3901    pub fn connect_private_key_password_notify<F: Fn(&Self) + 'static>(
3902        &self,
3903        f: F,
3904    ) -> SignalHandlerId {
3905        unsafe extern "C" fn notify_private_key_password_trampoline<
3906            F: Fn(&Setting8021x) + 'static,
3907        >(
3908            this: *mut ffi::NMSetting8021x,
3909            _param_spec: glib::ffi::gpointer,
3910            f: glib::ffi::gpointer,
3911        ) {
3912            let f: &F = &*(f as *const F);
3913            f(&from_glib_borrow(this))
3914        }
3915        unsafe {
3916            let f: Box_<F> = Box_::new(f);
3917            connect_raw(
3918                self.as_ptr() as *mut _,
3919                c"notify::private-key-password".as_ptr() as *const _,
3920                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3921                    notify_private_key_password_trampoline::<F> as *const (),
3922                )),
3923                Box_::into_raw(f),
3924            )
3925        }
3926    }
3927
3928    #[doc(alias = "private-key-password-flags")]
3929    pub fn connect_private_key_password_flags_notify<F: Fn(&Self) + 'static>(
3930        &self,
3931        f: F,
3932    ) -> SignalHandlerId {
3933        unsafe extern "C" fn notify_private_key_password_flags_trampoline<
3934            F: Fn(&Setting8021x) + 'static,
3935        >(
3936            this: *mut ffi::NMSetting8021x,
3937            _param_spec: glib::ffi::gpointer,
3938            f: glib::ffi::gpointer,
3939        ) {
3940            let f: &F = &*(f as *const F);
3941            f(&from_glib_borrow(this))
3942        }
3943        unsafe {
3944            let f: Box_<F> = Box_::new(f);
3945            connect_raw(
3946                self.as_ptr() as *mut _,
3947                c"notify::private-key-password-flags".as_ptr() as *const _,
3948                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3949                    notify_private_key_password_flags_trampoline::<F> as *const (),
3950                )),
3951                Box_::into_raw(f),
3952            )
3953        }
3954    }
3955
3956    #[cfg_attr(feature = "v1_2", deprecated = "Since 1.2")]
3957    #[doc(alias = "subject-match")]
3958    pub fn connect_subject_match_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3959        unsafe extern "C" fn notify_subject_match_trampoline<F: Fn(&Setting8021x) + 'static>(
3960            this: *mut ffi::NMSetting8021x,
3961            _param_spec: glib::ffi::gpointer,
3962            f: glib::ffi::gpointer,
3963        ) {
3964            let f: &F = &*(f as *const F);
3965            f(&from_glib_borrow(this))
3966        }
3967        unsafe {
3968            let f: Box_<F> = Box_::new(f);
3969            connect_raw(
3970                self.as_ptr() as *mut _,
3971                c"notify::subject-match".as_ptr() as *const _,
3972                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3973                    notify_subject_match_trampoline::<F> as *const (),
3974                )),
3975                Box_::into_raw(f),
3976            )
3977        }
3978    }
3979
3980    #[doc(alias = "system-ca-certs")]
3981    pub fn connect_system_ca_certs_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3982        unsafe extern "C" fn notify_system_ca_certs_trampoline<F: Fn(&Setting8021x) + 'static>(
3983            this: *mut ffi::NMSetting8021x,
3984            _param_spec: glib::ffi::gpointer,
3985            f: glib::ffi::gpointer,
3986        ) {
3987            let f: &F = &*(f as *const F);
3988            f(&from_glib_borrow(this))
3989        }
3990        unsafe {
3991            let f: Box_<F> = Box_::new(f);
3992            connect_raw(
3993                self.as_ptr() as *mut _,
3994                c"notify::system-ca-certs".as_ptr() as *const _,
3995                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3996                    notify_system_ca_certs_trampoline::<F> as *const (),
3997                )),
3998                Box_::into_raw(f),
3999            )
4000        }
4001    }
4002}
4003
4004impl Default for Setting8021x {
4005    fn default() -> Self {
4006        Self::new()
4007    }
4008}
4009
4010// rustdoc-stripper-ignore-next
4011/// A [builder-pattern] type to construct [`Setting8021x`] objects.
4012///
4013/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
4014#[must_use = "The builder must be built to be used"]
4015pub struct Setting8021xBuilder {
4016    builder: glib::object::ObjectBuilder<'static, Setting8021x>,
4017}
4018
4019impl Setting8021xBuilder {
4020    fn new() -> Self {
4021        Self {
4022            builder: glib::object::Object::builder(),
4023        }
4024    }
4025
4026    /// List of strings to be matched against the altSubjectName of the
4027    /// certificate presented by the authentication server. If the list is empty,
4028    /// no verification of the server certificate's altSubjectName is performed.
4029    pub fn altsubject_matches(self, altsubject_matches: impl Into<glib::StrV>) -> Self {
4030        Self {
4031            builder: self
4032                .builder
4033                .property("altsubject-matches", altsubject_matches.into()),
4034        }
4035    }
4036
4037    /// Anonymous identity string for EAP authentication methods.  Used as the
4038    /// unencrypted identity with EAP types that support different tunneled
4039    /// identity like EAP-TTLS.
4040    pub fn anonymous_identity(self, anonymous_identity: impl Into<glib::GString>) -> Self {
4041        Self {
4042            builder: self
4043                .builder
4044                .property("anonymous-identity", anonymous_identity.into()),
4045        }
4046    }
4047
4048    /// A timeout for the authentication. Zero means the global default; if the
4049    /// global default is not set, the authentication timeout is 25 seconds.
4050    #[cfg(feature = "v1_8")]
4051    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4052    pub fn auth_timeout(self, auth_timeout: i32) -> Self {
4053        Self {
4054            builder: self.builder.property("auth-timeout", auth_timeout),
4055        }
4056    }
4057
4058    //pub fn ca_cert(self, ca_cert: /*Ignored*/&glib::Bytes) -> Self {
4059    //    Self { builder: self.builder.property("ca-cert", ca_cert), }
4060    //}
4061
4062    /// The password used to access the CA certificate stored in
4063    /// #NMSetting8021x:ca-cert property. Only makes sense if the certificate
4064    /// is stored on a PKCS#<!-- -->11 token that requires a login.
4065    #[cfg(feature = "v1_8")]
4066    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4067    pub fn ca_cert_password(self, ca_cert_password: impl Into<glib::GString>) -> Self {
4068        Self {
4069            builder: self
4070                .builder
4071                .property("ca-cert-password", ca_cert_password.into()),
4072        }
4073    }
4074
4075    /// Flags indicating how to handle the #NMSetting8021x:ca-cert-password property.
4076    #[cfg(feature = "v1_8")]
4077    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4078    pub fn ca_cert_password_flags(self, ca_cert_password_flags: SettingSecretFlags) -> Self {
4079        Self {
4080            builder: self
4081                .builder
4082                .property("ca-cert-password-flags", ca_cert_password_flags),
4083        }
4084    }
4085
4086    /// UTF-8 encoded path to a directory containing PEM or DER formatted
4087    /// certificates to be added to the verification chain in addition to the
4088    /// certificate specified in the #NMSetting8021x:ca-cert property.
4089    ///
4090    /// If NMSetting8021x:system-ca-certs is enabled and the built-in CA
4091    /// path is an existing directory, then this setting is ignored.
4092    pub fn ca_path(self, ca_path: impl Into<glib::GString>) -> Self {
4093        Self {
4094            builder: self.builder.property("ca-path", ca_path.into()),
4095        }
4096    }
4097
4098    //pub fn client_cert(self, client_cert: /*Ignored*/&glib::Bytes) -> Self {
4099    //    Self { builder: self.builder.property("client-cert", client_cert), }
4100    //}
4101
4102    /// The password used to access the client certificate stored in
4103    /// #NMSetting8021x:client-cert property. Only makes sense if the certificate
4104    /// is stored on a PKCS#<!-- -->11 token that requires a login.
4105    #[cfg(feature = "v1_8")]
4106    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4107    pub fn client_cert_password(self, client_cert_password: impl Into<glib::GString>) -> Self {
4108        Self {
4109            builder: self
4110                .builder
4111                .property("client-cert-password", client_cert_password.into()),
4112        }
4113    }
4114
4115    /// Flags indicating how to handle the #NMSetting8021x:client-cert-password property.
4116    #[cfg(feature = "v1_8")]
4117    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4118    pub fn client_cert_password_flags(
4119        self,
4120        client_cert_password_flags: SettingSecretFlags,
4121    ) -> Self {
4122        Self {
4123            builder: self
4124                .builder
4125                .property("client-cert-password-flags", client_cert_password_flags),
4126        }
4127    }
4128
4129    /// Constraint for server domain name. If set, this list of FQDNs is used as
4130    /// a match requirement for dNSName element(s) of the certificate presented
4131    /// by the authentication server.  If a matching dNSName is found, this
4132    /// constraint is met.  If no dNSName values are present, this constraint is
4133    /// matched against SubjectName CN using the same comparison.
4134    /// Multiple valid FQDNs can be passed as a ";" delimited list.
4135    #[cfg(feature = "v1_24")]
4136    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
4137    pub fn domain_match(self, domain_match: impl Into<glib::GString>) -> Self {
4138        Self {
4139            builder: self.builder.property("domain-match", domain_match.into()),
4140        }
4141    }
4142
4143    /// Constraint for server domain name. If set, this FQDN is used as a suffix
4144    /// match requirement for dNSName element(s) of the certificate presented by
4145    /// the authentication server.  If a matching dNSName is found, this
4146    /// constraint is met.  If no dNSName values are present, this constraint is
4147    /// matched against SubjectName CN using same suffix match comparison.
4148    /// Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited
4149    /// list.
4150    #[cfg(feature = "v1_2")]
4151    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
4152    pub fn domain_suffix_match(self, domain_suffix_match: impl Into<glib::GString>) -> Self {
4153        Self {
4154            builder: self
4155                .builder
4156                .property("domain-suffix-match", domain_suffix_match.into()),
4157        }
4158    }
4159
4160    /// The allowed EAP method to be used when authenticating to the network with
4161    /// 802.1x.  Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd",
4162    /// and "fast".  Each method requires different configuration using the
4163    /// properties of this setting; refer to wpa_supplicant documentation for the
4164    /// allowed combinations.
4165    pub fn eap(self, eap: impl Into<glib::StrV>) -> Self {
4166        Self {
4167            builder: self.builder.property("eap", eap.into()),
4168        }
4169    }
4170
4171    /// Identity string for EAP authentication methods.  Often the user's user or
4172    /// login name.
4173    pub fn identity(self, identity: impl Into<glib::GString>) -> Self {
4174        Self {
4175            builder: self.builder.property("identity", identity.into()),
4176        }
4177    }
4178
4179    /// Define openssl_ciphers for wpa_supplicant. Openssl sometimes moves ciphers
4180    /// among SECLEVELs, thus compiled-in default value in wpa_supplicant
4181    /// (as modified by some linux distributions) sometimes prevents
4182    /// to connect to old servers that do not support new protocols.
4183    #[cfg(feature = "v1_48")]
4184    #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
4185    pub fn openssl_ciphers(self, openssl_ciphers: impl Into<glib::GString>) -> Self {
4186        Self {
4187            builder: self
4188                .builder
4189                .property("openssl-ciphers", openssl_ciphers.into()),
4190        }
4191    }
4192
4193    /// Whether the 802.1X authentication is optional. If [`true`], the activation
4194    /// will continue even after a timeout or an authentication failure. Setting
4195    /// the property to [`true`] is currently allowed only for Ethernet connections.
4196    /// If set to [`false`], the activation can continue only after a successful
4197    /// authentication.
4198    #[cfg(feature = "v1_22")]
4199    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
4200    pub fn optional(self, optional: bool) -> Self {
4201        Self {
4202            builder: self.builder.property("optional", optional),
4203        }
4204    }
4205
4206    /// UTF-8 encoded file path containing PAC for EAP-FAST.
4207    pub fn pac_file(self, pac_file: impl Into<glib::GString>) -> Self {
4208        Self {
4209            builder: self.builder.property("pac-file", pac_file.into()),
4210        }
4211    }
4212
4213    /// UTF-8 encoded password used for EAP authentication methods. If both the
4214    /// #NMSetting8021x:password property and the #NMSetting8021x:password-raw
4215    /// property are specified, #NMSetting8021x:password is preferred.
4216    pub fn password(self, password: impl Into<glib::GString>) -> Self {
4217        Self {
4218            builder: self.builder.property("password", password.into()),
4219        }
4220    }
4221
4222    /// Flags indicating how to handle the #NMSetting8021x:password property.
4223    pub fn password_flags(self, password_flags: SettingSecretFlags) -> Self {
4224        Self {
4225            builder: self.builder.property("password-flags", password_flags),
4226        }
4227    }
4228
4229    //pub fn password_raw(self, password_raw: /*Ignored*/&glib::Bytes) -> Self {
4230    //    Self { builder: self.builder.property("password-raw", password_raw), }
4231    //}
4232
4233    /// Flags indicating how to handle the #NMSetting8021x:password-raw property.
4234    pub fn password_raw_flags(self, password_raw_flags: SettingSecretFlags) -> Self {
4235        Self {
4236            builder: self
4237                .builder
4238                .property("password-raw-flags", password_raw_flags),
4239        }
4240    }
4241
4242    /// Specifies authentication flags to use in "phase 1" outer
4243    /// authentication using #NMSetting8021xAuthFlags options.
4244    /// The individual TLS versions can be explicitly disabled. TLS time checks
4245    /// can be also disabled. If a certain TLS disable flag is not
4246    /// set, it is up to the supplicant to allow or forbid it. The TLS options
4247    /// map to tls_disable_tlsv1_x and tls_disable_time_checks settings.
4248    /// See the wpa_supplicant documentation for more details.
4249    #[cfg(feature = "v1_8")]
4250    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4251    pub fn phase1_auth_flags(self, phase1_auth_flags: u32) -> Self {
4252        Self {
4253            builder: self
4254                .builder
4255                .property("phase1-auth-flags", phase1_auth_flags),
4256        }
4257    }
4258
4259    /// Enables or disables in-line provisioning of EAP-FAST credentials when
4260    /// FAST is specified as the EAP method in the #NMSetting8021x:eap property.
4261    /// Recognized values are "0" (disabled), "1" (allow unauthenticated
4262    /// provisioning), "2" (allow authenticated provisioning), and "3" (allow
4263    /// both authenticated and unauthenticated provisioning).  See the
4264    /// wpa_supplicant documentation for more details.
4265    pub fn phase1_fast_provisioning(
4266        self,
4267        phase1_fast_provisioning: impl Into<glib::GString>,
4268    ) -> Self {
4269        Self {
4270            builder: self
4271                .builder
4272                .property("phase1-fast-provisioning", phase1_fast_provisioning.into()),
4273        }
4274    }
4275
4276    /// Forces use of the new PEAP label during key derivation.  Some RADIUS
4277    /// servers may require forcing the new PEAP label to interoperate with
4278    /// PEAPv1.  Set to "1" to force use of the new PEAP label.  See the
4279    /// wpa_supplicant documentation for more details.
4280    pub fn phase1_peaplabel(self, phase1_peaplabel: impl Into<glib::GString>) -> Self {
4281        Self {
4282            builder: self
4283                .builder
4284                .property("phase1-peaplabel", phase1_peaplabel.into()),
4285        }
4286    }
4287
4288    /// Forces which PEAP version is used when PEAP is set as the EAP method in
4289    /// the #NMSetting8021x:eap property.  When unset, the version reported by
4290    /// the server will be used.  Sometimes when using older RADIUS servers, it
4291    /// is necessary to force the client to use a particular PEAP version.  To do
4292    /// so, this property may be set to "0" or "1" to force that specific PEAP
4293    /// version.
4294    pub fn phase1_peapver(self, phase1_peapver: impl Into<glib::GString>) -> Self {
4295        Self {
4296            builder: self
4297                .builder
4298                .property("phase1-peapver", phase1_peapver.into()),
4299        }
4300    }
4301
4302    /// List of strings to be matched against the altSubjectName of the
4303    /// certificate presented by the authentication server during the inner
4304    /// "phase 2" authentication. If the list is empty, no verification of the
4305    /// server certificate's altSubjectName is performed.
4306    pub fn phase2_altsubject_matches(
4307        self,
4308        phase2_altsubject_matches: impl Into<glib::StrV>,
4309    ) -> Self {
4310        Self {
4311            builder: self.builder.property(
4312                "phase2-altsubject-matches",
4313                phase2_altsubject_matches.into(),
4314            ),
4315        }
4316    }
4317
4318    /// Specifies the allowed "phase 2" inner authentication method when an EAP
4319    /// method that uses an inner TLS tunnel is specified in the #NMSetting8021x:eap
4320    /// property.  For TTLS this property selects one of the supported non-EAP
4321    /// inner methods: "pap", "chap", "mschap", "mschapv2" while
4322    /// #NMSetting8021x:phase2-autheap selects an EAP inner method.  For PEAP
4323    /// this selects an inner EAP method, one of: "gtc", "otp", "md5" and "tls".
4324    /// Each "phase 2" inner method requires specific parameters for successful
4325    /// authentication; see the wpa_supplicant documentation for more details.
4326    /// Both #NMSetting8021x:phase2-auth and #NMSetting8021x:phase2-autheap cannot
4327    /// be specified.
4328    pub fn phase2_auth(self, phase2_auth: impl Into<glib::GString>) -> Self {
4329        Self {
4330            builder: self.builder.property("phase2-auth", phase2_auth.into()),
4331        }
4332    }
4333
4334    /// Specifies the allowed "phase 2" inner EAP-based authentication method
4335    /// when TTLS is specified in the #NMSetting8021x:eap property.  Recognized
4336    /// EAP-based "phase 2" methods are "md5", "mschapv2", "otp", "gtc", and
4337    /// "tls". Each "phase 2" inner method requires specific parameters for
4338    /// successful authentication; see the wpa_supplicant documentation for
4339    /// more details.
4340    pub fn phase2_autheap(self, phase2_autheap: impl Into<glib::GString>) -> Self {
4341        Self {
4342            builder: self
4343                .builder
4344                .property("phase2-autheap", phase2_autheap.into()),
4345        }
4346    }
4347
4348    //pub fn phase2_ca_cert(self, phase2_ca_cert: /*Ignored*/&glib::Bytes) -> Self {
4349    //    Self { builder: self.builder.property("phase2-ca-cert", phase2_ca_cert), }
4350    //}
4351
4352    /// The password used to access the "phase2" CA certificate stored in
4353    /// #NMSetting8021x:phase2-ca-cert property. Only makes sense if the certificate
4354    /// is stored on a PKCS#<!-- -->11 token that requires a login.
4355    #[cfg(feature = "v1_8")]
4356    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4357    pub fn phase2_ca_cert_password(
4358        self,
4359        phase2_ca_cert_password: impl Into<glib::GString>,
4360    ) -> Self {
4361        Self {
4362            builder: self
4363                .builder
4364                .property("phase2-ca-cert-password", phase2_ca_cert_password.into()),
4365        }
4366    }
4367
4368    /// Flags indicating how to handle the #NMSetting8021x:phase2-ca-cert-password property.
4369    #[cfg(feature = "v1_8")]
4370    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4371    pub fn phase2_ca_cert_password_flags(
4372        self,
4373        phase2_ca_cert_password_flags: SettingSecretFlags,
4374    ) -> Self {
4375        Self {
4376            builder: self.builder.property(
4377                "phase2-ca-cert-password-flags",
4378                phase2_ca_cert_password_flags,
4379            ),
4380        }
4381    }
4382
4383    /// UTF-8 encoded path to a directory containing PEM or DER formatted
4384    /// certificates to be added to the verification chain in addition to the
4385    /// certificate specified in the #NMSetting8021x:phase2-ca-cert property.
4386    ///
4387    /// If NMSetting8021x:system-ca-certs is enabled and the built-in CA
4388    /// path is an existing directory, then this setting is ignored.
4389    pub fn phase2_ca_path(self, phase2_ca_path: impl Into<glib::GString>) -> Self {
4390        Self {
4391            builder: self
4392                .builder
4393                .property("phase2-ca-path", phase2_ca_path.into()),
4394        }
4395    }
4396
4397    //pub fn phase2_client_cert(self, phase2_client_cert: /*Ignored*/&glib::Bytes) -> Self {
4398    //    Self { builder: self.builder.property("phase2-client-cert", phase2_client_cert), }
4399    //}
4400
4401    /// The password used to access the "phase2" client certificate stored in
4402    /// #NMSetting8021x:phase2-client-cert property. Only makes sense if the certificate
4403    /// is stored on a PKCS#<!-- -->11 token that requires a login.
4404    #[cfg(feature = "v1_8")]
4405    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4406    pub fn phase2_client_cert_password(
4407        self,
4408        phase2_client_cert_password: impl Into<glib::GString>,
4409    ) -> Self {
4410        Self {
4411            builder: self.builder.property(
4412                "phase2-client-cert-password",
4413                phase2_client_cert_password.into(),
4414            ),
4415        }
4416    }
4417
4418    /// Flags indicating how to handle the #NMSetting8021x:phase2-client-cert-password property.
4419    #[cfg(feature = "v1_8")]
4420    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
4421    pub fn phase2_client_cert_password_flags(
4422        self,
4423        phase2_client_cert_password_flags: SettingSecretFlags,
4424    ) -> Self {
4425        Self {
4426            builder: self.builder.property(
4427                "phase2-client-cert-password-flags",
4428                phase2_client_cert_password_flags,
4429            ),
4430        }
4431    }
4432
4433    /// Constraint for server domain name. If set, this list of FQDNs is used as
4434    /// a match requirement for dNSName element(s) of the certificate presented
4435    /// by the authentication server during the inner "phase 2" authentication.
4436    /// If a matching dNSName is found, this constraint is met.  If no dNSName
4437    /// values are present, this constraint is matched against SubjectName CN
4438    /// using the same comparison.
4439    /// Multiple valid FQDNs can be passed as a ";" delimited list.
4440    #[cfg(feature = "v1_24")]
4441    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
4442    pub fn phase2_domain_match(self, phase2_domain_match: impl Into<glib::GString>) -> Self {
4443        Self {
4444            builder: self
4445                .builder
4446                .property("phase2-domain-match", phase2_domain_match.into()),
4447        }
4448    }
4449
4450    /// Constraint for server domain name. If set, this FQDN is used as a suffix
4451    /// match requirement for dNSName element(s) of the certificate presented by
4452    /// the authentication server during the inner "phase 2" authentication.  If
4453    /// a matching dNSName is found, this constraint is met.  If no dNSName
4454    /// values are present, this constraint is matched against SubjectName CN
4455    /// using same suffix match comparison.
4456    /// Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited
4457    /// list.
4458    #[cfg(feature = "v1_2")]
4459    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
4460    pub fn phase2_domain_suffix_match(
4461        self,
4462        phase2_domain_suffix_match: impl Into<glib::GString>,
4463    ) -> Self {
4464        Self {
4465            builder: self.builder.property(
4466                "phase2-domain-suffix-match",
4467                phase2_domain_suffix_match.into(),
4468            ),
4469        }
4470    }
4471
4472    //pub fn phase2_private_key(self, phase2_private_key: /*Ignored*/&glib::Bytes) -> Self {
4473    //    Self { builder: self.builder.property("phase2-private-key", phase2_private_key), }
4474    //}
4475
4476    /// The password used to decrypt the "phase 2" private key specified in the
4477    /// #NMSetting8021x:phase2-private-key property when the private key either
4478    /// uses the path scheme, or is a PKCS#<!-- -->12 format key.  Setting this
4479    /// property directly is not generally necessary except when returning
4480    /// secrets to NetworkManager; it is generally set automatically when setting
4481    /// the private key by the nm_setting_802_1x_set_phase2_private_key()
4482    /// function.
4483    pub fn phase2_private_key_password(
4484        self,
4485        phase2_private_key_password: impl Into<glib::GString>,
4486    ) -> Self {
4487        Self {
4488            builder: self.builder.property(
4489                "phase2-private-key-password",
4490                phase2_private_key_password.into(),
4491            ),
4492        }
4493    }
4494
4495    /// Flags indicating how to handle the
4496    /// #NMSetting8021x:phase2-private-key-password property.
4497    pub fn phase2_private_key_password_flags(
4498        self,
4499        phase2_private_key_password_flags: SettingSecretFlags,
4500    ) -> Self {
4501        Self {
4502            builder: self.builder.property(
4503                "phase2-private-key-password-flags",
4504                phase2_private_key_password_flags,
4505            ),
4506        }
4507    }
4508
4509    /// Substring to be matched against the subject of the certificate presented
4510    /// by the authentication server during the inner "phase 2"
4511    /// authentication. When unset, no verification of the authentication server
4512    /// certificate's subject is performed. This property provides little security,
4513    /// if any, and should not be used.
4514    /// Use #NMSetting8021x:phase2-domain-suffix-match instead.
4515    #[cfg_attr(feature = "v1_2", deprecated = "Since 1.2")]
4516    pub fn phase2_subject_match(self, phase2_subject_match: impl Into<glib::GString>) -> Self {
4517        Self {
4518            builder: self
4519                .builder
4520                .property("phase2-subject-match", phase2_subject_match.into()),
4521        }
4522    }
4523
4524    /// PIN used for EAP authentication methods.
4525    pub fn pin(self, pin: impl Into<glib::GString>) -> Self {
4526        Self {
4527            builder: self.builder.property("pin", pin.into()),
4528        }
4529    }
4530
4531    /// Flags indicating how to handle the #NMSetting8021x:pin property.
4532    pub fn pin_flags(self, pin_flags: SettingSecretFlags) -> Self {
4533        Self {
4534            builder: self.builder.property("pin-flags", pin_flags),
4535        }
4536    }
4537
4538    //pub fn private_key(self, private_key: /*Ignored*/&glib::Bytes) -> Self {
4539    //    Self { builder: self.builder.property("private-key", private_key), }
4540    //}
4541
4542    /// The password used to decrypt the private key specified in the
4543    /// #NMSetting8021x:private-key property when the private key either uses the
4544    /// path scheme, or if the private key is a PKCS#<!-- -->12 format key.  Setting this
4545    /// property directly is not generally necessary except when returning
4546    /// secrets to NetworkManager; it is generally set automatically when setting
4547    /// the private key by the nm_setting_802_1x_set_private_key() function.
4548    pub fn private_key_password(self, private_key_password: impl Into<glib::GString>) -> Self {
4549        Self {
4550            builder: self
4551                .builder
4552                .property("private-key-password", private_key_password.into()),
4553        }
4554    }
4555
4556    /// Flags indicating how to handle the #NMSetting8021x:private-key-password
4557    /// property.
4558    pub fn private_key_password_flags(
4559        self,
4560        private_key_password_flags: SettingSecretFlags,
4561    ) -> Self {
4562        Self {
4563            builder: self
4564                .builder
4565                .property("private-key-password-flags", private_key_password_flags),
4566        }
4567    }
4568
4569    /// Substring to be matched against the subject of the certificate presented
4570    /// by the authentication server. When unset, no verification of the
4571    /// authentication server certificate's subject is performed. This property
4572    /// provides little security, if any, and should not be used.
4573    /// Use #NMSetting8021x:phase2-domain-suffix-match instead.
4574    #[cfg_attr(feature = "v1_2", deprecated = "Since 1.2")]
4575    pub fn subject_match(self, subject_match: impl Into<glib::GString>) -> Self {
4576        Self {
4577            builder: self.builder.property("subject-match", subject_match.into()),
4578        }
4579    }
4580
4581    /// When [`true`], overrides the #NMSetting8021x:ca-path and
4582    /// #NMSetting8021x:phase2-ca-path properties using the system CA directory
4583    /// specified at configure time with the --system-ca-path switch.  The
4584    /// certificates in this directory are added to the verification chain in
4585    /// addition to any certificates specified by the #NMSetting8021x:ca-cert and
4586    /// #NMSetting8021x:phase2-ca-cert properties. If the path provided with
4587    /// --system-ca-path is rather a file name (bundle of trusted CA certificates),
4588    /// it overrides #NMSetting8021x:ca-cert and #NMSetting8021x:phase2-ca-cert
4589    /// properties instead (sets ca_cert/ca_cert2 options for wpa_supplicant).
4590    pub fn system_ca_certs(self, system_ca_certs: bool) -> Self {
4591        Self {
4592            builder: self.builder.property("system-ca-certs", system_ca_certs),
4593        }
4594    }
4595
4596    // rustdoc-stripper-ignore-next
4597    /// Build the [`Setting8021x`].
4598    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
4599    pub fn build(self) -> Setting8021x {
4600        assert_initialized_main_thread!();
4601        self.builder.build()
4602    }
4603}