DevicePolicyManager.GrantKeyPairToWifiAuth(String) Method

Definition

Called by a device or profile owner, or delegated certificate chooser (an app that has been delegated the #DELEGATION_CERT_SELECTION privilege), to allow using a KeyChain key pair for authentication to Wifi networks.

[Android.Runtime.Register("grantKeyPairToWifiAuth", "(Ljava/lang/String;)Z", "GetGrantKeyPairToWifiAuth_Ljava_lang_String_Handler", ApiSince=31)]
public virtual bool GrantKeyPairToWifiAuth (string alias);
[<Android.Runtime.Register("grantKeyPairToWifiAuth", "(Ljava/lang/String;)Z", "GetGrantKeyPairToWifiAuth_Ljava_lang_String_Handler", ApiSince=31)>]
abstract member GrantKeyPairToWifiAuth : string -> bool
override this.GrantKeyPairToWifiAuth : string -> bool

Parameters

alias
String

The alias of the key pair.

Returns

true if the operation was set successfully, false otherwise.

Attributes

Remarks

Called by a device or profile owner, or delegated certificate chooser (an app that has been delegated the #DELEGATION_CERT_SELECTION privilege), to allow using a KeyChain key pair for authentication to Wifi networks. The key can then be used in configurations passed to android.net.wifi.WifiManager#addNetwork.

Starting from android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE throws an IllegalArgumentException if alias doesn't correspond to an existing key.

Java documentation for android.app.admin.DevicePolicyManager.grantKeyPairToWifiAuth(java.lang.String).

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.

Applies to