Most visited

Recently visited

Added in API level 18

WifiEnterpriseConfig

public class WifiEnterpriseConfig
extends Object implements Parcelable

java.lang.Object
    android.net.wifi.WifiEnterpriseConfig


Wi-Fi的企业配置详细信息。 存储有关EAP方法和任何关联证书的详细信息。

摘要(Summary)

Nested classes

class WifiEnterpriseConfig.Eap

使用可扩展身份验证协议方法

class WifiEnterpriseConfig.Phase2

使用内部认证方法

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<WifiEnterpriseConfig> CREATOR

Public constructors

WifiEnterpriseConfig()
WifiEnterpriseConfig(WifiEnterpriseConfig source)

复制构造函数

公共方法(Public methods)

int describeContents()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。

String getAltSubjectMatch()

获得替代主题匹配

String getAnonymousIdentity()

获取匿名身份

X509Certificate getCaCertificate()

获取CA证书。

X509Certificate[] getCaCertificates()

获取CA证书。

X509Certificate getClientCertificate()

获取客户端证书

String getDomainSuffixMatch()

获取domain_suffix_match值。

int getEapMethod()

获取eap方法。

String getIdentity()

获取身份

String getPassword()

获取密码。

int getPhase2Method()

获取阶段2认证方法。

String getPlmn()

获得plmn(公共陆地移动网络)的Passpoint凭证; 有关更多信息,请参阅(String)

String getRealm()

获取通行证凭证的领域; 有关更多信息,请参阅setRealm(String)

String getSubjectMatch()

此方法已在API级别23中弃用,以支持altSubjectMatch

void setAltSubjectMatch(String altSubjectMatch)

设置备用主题匹配。

void setAnonymousIdentity(String anonymousIdentity)

设置匿名身份。

void setCaCertificate(X509Certificate cert)

指定一个标识服务器的X.509证书。

void setCaCertificates(X509Certificate[] certs)

指定标识服务器的X.509证书列表。

void setClientKeyEntry(PrivateKey privateKey, X509Certificate clientCertificate)

指定客户端授权的私钥和客户端证书。

void setDomainSuffixMatch(String domain)

在wpa_supplicant上设置domain_suffix_match指令。

void setEapMethod(int eapMethod)

设置EAP身份验证方法。

void setIdentity(String identity)

设置身份

void setPassword(String password)

设置密码。

void setPhase2Method(int phase2Method)

设置阶段2身份验证方法。

void setPlmn(String plmn)

设置Passpoint凭证提供商的PLMN(公共陆地移动网络)

void setRealm(String realm)

设置通行证凭证的领域; 领域标识可以使用您的Passpoint凭证的一组网络

void setSubjectMatch(String subjectMatch)

此方法已在API级别23中弃用,以支持altSubjectMatch

String toString()

返回对象的字符串表示形式。

void writeToParcel(Parcel dest, int flags)

将此对象平铺到一个包裹中。

继承方法(Inherited methods)

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 18
Creator<WifiEnterpriseConfig> CREATOR

Public constructors

WifiEnterpriseConfig

Added in API level 18
WifiEnterpriseConfig ()

WifiEnterpriseConfig

Added in API level 18
WifiEnterpriseConfig (WifiEnterpriseConfig source)

复制构造函数

参数(Parameters)
source WifiEnterpriseConfig

公共方法(Public methods)

describeContents

Added in API level 18
int describeContents ()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。

返回(Returns)
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getAltSubjectMatch

Added in API level 23
String getAltSubjectMatch ()

获得替代主题匹配

返回(Returns)
String the alternate subject match string

getAnonymousIdentity

Added in API level 18
String getAnonymousIdentity ()

获取匿名身份

返回(Returns)
String anonymous identity

getCaCertificate

Added in API level 18
X509Certificate getCaCertificate ()

获取CA证书。 如果先前配置了多个CA证书,请返回第一个。

返回(Returns)
X509Certificate X.509 CA certificate

getCaCertificates

Added in API level 24
X509Certificate[] getCaCertificates ()

获取CA证书。

返回(Returns)
X509Certificate[]

getClientCertificate

Added in API level 18
X509Certificate getClientCertificate ()

获取客户端证书

返回(Returns)
X509Certificate X.509 client certificate

getDomainSuffixMatch

Added in API level 23
String getDomainSuffixMatch ()

获取domain_suffix_match值。 请参阅setDomSuffixMatch。

返回(Returns)
String The domain value.

getEapMethod

Added in API level 18
int getEapMethod ()

获取eap方法。

返回(Returns)
int eap method configured

getIdentity

Added in API level 18
String getIdentity ()

获取身份

返回(Returns)
String the identity

getPassword

Added in API level 18
String getPassword ()

获取密码。 返回本地设置的密码值。 对于从框架获取的网络,返回“*”。

返回(Returns)
String

getPhase2Method

Added in API level 18
int getPhase2Method ()

获取阶段2认证方法。

返回(Returns)
int a phase 2 method defined at WifiEnterpriseConfig.Phase2

getPlmn

Added in API level 23
String getPlmn ()

获得plmn(公共陆地移动网络)的Passpoint凭证; 有关更多信息,请参阅(String)

返回(Returns)
String the plmn

getRealm

Added in API level 23
String getRealm ()

获取通行证凭证的领域; 有关更多信息,请参阅setRealm(String)

返回(Returns)
String the realm

getSubjectMatch

Added in API level 18
String getSubjectMatch ()

此方法在API级别23中已弃用。
赞成altSubjectMatch

获得主题匹配(不推荐)

返回(Returns)
String the subject match string

setAltSubjectMatch

Added in API level 23
void setAltSubjectMatch (String altSubjectMatch)

设置备用主题匹配。 这是要与认证服务器证书的替代主题进行匹配的子字符串。

参数(Parameters)
altSubjectMatch String: substring to be matched, for example DNS:server.example.com;EMAIL:[email protected]

setAnonymousIdentity

Added in API level 18
void setAnonymousIdentity (String anonymousIdentity)

设置匿名身份。 这用作某些EAP类型的未加密身份

参数(Parameters)
anonymousIdentity String: the anonymous identity

setCaCertificate

Added in API level 18
void setCaCertificate (X509Certificate cert)

指定一个标识服务器的X.509证书。

默认名称将自动分配给证书并与此配置一起使用。 该框架负责在保存配置时安装证书并在配置被移除时删除证书。

参数(Parameters)
cert X509Certificate: X.509 CA certificate
抛出异常(Throws)
IllegalArgumentException if not a CA certificate

setCaCertificates

Added in API level 24
void setCaCertificates (X509Certificate[] certs)

指定标识服务器的X.509证书列表。 如果服务器证书的CA与给定证书中的一个匹配,则验证通过。

默认名称将自动分配给证书并与此配置一起使用。 框架负责在配置保存时安装证书并在配置被移除时删除证书。

参数(Parameters)
certs X509Certificate: X.509 CA certificates
抛出异常(Throws)
IllegalArgumentException if any of the provided certificates is not a CA certificate

setClientKeyEntry

Added in API level 18
void setClientKeyEntry (PrivateKey privateKey, 
                X509Certificate clientCertificate)

指定客户端授权的私钥和客户端证书。

默认名称将自动分配给密钥条目并用于此配置。 框架负责在配置保存时安装密钥条目,并在配置被删除时删除密钥条目。

抛出异常(Throws)
IllegalArgumentException for an invalid key or certificate.

setDomainSuffixMatch

Added in API level 23
void setDomainSuffixMatch (String domain)

在wpa_supplicant上设置domain_suffix_match指令。 这是根据WFA HS2.0规范第7.3.3.2节第二段的Hotspot 2.0定义的AAA服务器证书匹配使用的参数。 从wpa_supplicant文档:约束服务器域名。 如果设置,则此FQDN将用作SubjectAltName dNSName元素中的AAA服务器证书的后缀匹配要求。 如果找到匹配的dNSName,则会满足此约束。 如果不存在dNSName值,则使用相同的后缀匹配比较将该约束与SubjectName CN进行匹配。 这里的后缀匹配意味着主机/域名从顶级域开始一次比较一个标签,domain_suffix_match中的所有标签都应包含在证书中。 除了所需的标签之外,证书还可能包含其他子级别标签。 例如,domain_suffix_match = example.com将与test.example.com匹配,但不匹配test-example.com。

参数(Parameters)
domain String: The domain value

setEapMethod

Added in API level 18
void setEapMethod (int eapMethod)

设置EAP身份验证方法。

参数(Parameters)
eapMethod int: is one PEAP, TLS, TTLS or PWD
抛出异常(Throws)
IllegalArgumentException on an invalid eap method

setIdentity

Added in API level 18
void setIdentity (String identity)

设置身份

setPassword

Added in API level 18
void setPassword (String password)

设置密码。

参数(Parameters)
password String: the password

setPhase2Method

Added in API level 18
void setPhase2Method (int phase2Method)

设置阶段2身份验证方法。 设置安全通道后设置在阶段2中使用的内部认证方法

参数(Parameters)
phase2Method int: is the inner authentication method and can be one of NONE, PAP, MSCHAP, MSCHAPV2, GTC
抛出异常(Throws)
IllegalArgumentException on an invalid phase2 method

setPlmn

Added in API level 23
void setPlmn (String plmn)

设置Passpoint凭证提供商的PLMN(公共陆地移动网络)

参数(Parameters)
plmn String: the plmn value derived from mcc (mobile country code) & mnc (mobile network code)

setRealm

Added in API level 23
void setRealm (String realm)

设置通行证凭证的领域; 领域标识可以使用您的Passpoint凭证的一组网络

参数(Parameters)
realm String: the realm

setSubjectMatch

Added in API level 18
void setSubjectMatch (String subjectMatch)

此方法在API级别23中已弃用。
赞成altSubjectMatch

设置主题匹配(不建议使用)。 这是与认证服务器证书的主题相匹配的子字符串。

参数(Parameters)
subjectMatch String: substring to be matched

toString

Added in API level 18
String toString ()

返回对象的字符串表示形式。 通常, toString方法返回一个字符串,用于“文本地表示”该对象。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。

ObjecttoString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及该对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

返回(Returns)
String a string representation of the object.

writeToParcel

Added in API level 18
void writeToParcel (Parcel dest, 
                int flags)

将此对象平铺到一个包裹中。

参数(Parameters)
dest Parcel: The Parcel in which the object should be written.
flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.

Hooray!