IkeSessionParams.Builder.SetAuthEap(X509Certificate, EapSessionConfig) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures the IkeSession to use EAP authentication.
[Android.Runtime.Register("setAuthEap", "(Ljava/security/cert/X509Certificate;Landroid/net/eap/EapSessionConfig;)Landroid/net/ipsec/ike/IkeSessionParams$Builder;", "", ApiSince=31)]
public Android.Net.IpSec.Ike.IkeSessionParams.Builder SetAuthEap(Java.Security.Cert.X509Certificate? serverCaCert, Android.Net.Eap.EapSessionConfig eapConfig);
[<Android.Runtime.Register("setAuthEap", "(Ljava/security/cert/X509Certificate;Landroid/net/eap/EapSessionConfig;)Landroid/net/ipsec/ike/IkeSessionParams$Builder;", "", ApiSince=31)>]
member this.SetAuthEap : Java.Security.Cert.X509Certificate * Android.Net.Eap.EapSessionConfig -> Android.Net.IpSec.Ike.IkeSessionParams.Builder
Parameters
- serverCaCert
- X509Certificate
the CA certificate for validating the received server certificate(s). If a certificate is provided, it MUST be the root CA used by the server, or authentication will fail. If no certificate is provided, any root CA in the system's truststore is considered acceptable. This value may be null.
- eapConfig
- EapSessionConfig
Returns
Builder this, to facilitate chaining. This value cannot be null.
- Attributes
Remarks
Configures the IkeSession to use EAP authentication.
Not all EAP methods provide mutual authentication. As such EAP MUST be used in conjunction with a public-key-signature-based authentication of the remote server, unless EAP-Only authentication is enabled.
Callers may enable EAP-Only authentication by setting IkeSessionParams.IKE_OPTION_EAP_ONLY_AUTH, which will make IKE library request the remote to use EAP-Only authentication. The remote may opt to reject the request, at which point the received certificates and authentication payload WILL be validated with the provided root CA or system's truststore as usual. Only safe EAP methods as listed in RFC 5998 will be accepted for EAP-Only authentication.
If IkeSessionParams.IKE_OPTION_EAP_ONLY_AUTH is set, callers MUST configure EAP as the authentication method and all EAP methods set in EAP Session configuration MUST be safe methods that are accepted for EAP-Only authentication. Otherwise callers will get an exception when building the IkeSessionParams
Callers MUST declare only one authentication method. Calling this function will override the previously set authentication configuration.
Android reference for android.net.ipsec.ike.IkeSessionParams.Builder.setAuthEap.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.