后浪云鸿蒙OS教程:鸿蒙OS SecureCacheResponse

树叶云

SecureCacheResponse

java.lang.Object

|—java.net.CacheResponse

|—|—java.net.SecureCacheResponse

public abstract class SecureCacheResponse
extends CacheResponse

表示最初通过安全方式(例如 TLS)检索到的缓存响应。

构造函数摘要

构造函数描述
SecureCacheResponse()

方法总结

修饰符和类型方法描述
abstract StringgetCipherSuite()返回检索网络资源的原始连接上使用的密码套件。
abstract ListCertificategetLocalCertificateChain()返回在检索网络资源的原始连接握手期间发送到服务器的证书链。
abstract PrincipalgetLocalPrincipal()返回在检索网络资源的原始连接中握手期间发送到服务器的主体。
abstract PrincipalgetPeerPrincipal()返回在检索网络资源的原始连接期间作为定义会话的一部分而建立的服务器主体。
abstract ListCertificategetServerCertificateChain()从缓存中返回服务器的证书链,该证书链是作为在检索网络资源的原始连接中定义会话的一部分而建立的。
从类 java.net.CacheResponse 继承的方法
getBody, getHeaders
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

构造函数详细信息

SecureCacheResponse

public SecureCacheResponse()

方法详情

getCipherSuite

public abstract String getCipherSuite()

返回检索网络资源的原始连接上使用的密码套件。

返回:

表示密码套件的字符串

getLocalCertificateChain

public abstract ListCertificate getLocalCertificateChain()

返回在检索网络资源的原始连接握手期间发送到服务器的证书链。 注意:此方法仅在使用基于证书的密码套件时有用。

返回:

表示发送到服务器的证书链的不可变证书列表。 如果没有发送证书链,则返回 null。

getServerCertificateChain

public abstract ListCertificate getServerCertificateChain() throws SSLPeerUnverifiedException

返回服务器的证书链,该链是作为在从缓存中检索网络资源的原始连接中定义会话的一部分而建立的。 注意:此方法只能在使用基于证书的密码套件时使用; 将它与非基于证书的密码套件(例如 Kerberos)一起使用将引发 SSLPeerUnverifiedException。

返回:

代表服务器证书链的不可变证书列表。

Throws:

Throw名称Throw描述
SSLPeerUnverifiedException如果peer未通过验证。

getPeerPrincipal

public abstract Principal getPeerPrincipal() throws SSLPeerUnverifiedException

返回在检索网络资源的原始连接期间作为定义会话的一部分而建立的服务器主体。

返回:

服务器的主体。 对于基于 X509 的密码套件返回最终实体证书的 X500Principal,对于 Kerberos 密码套件返回 KerberosPrincipal。

Throws:

Throw名称Throw描述
SSLPeerUnverifiedException如果peer未经过验证。

getLocalPrincipal

public abstract Principal getLocalPrincipal()

返回在检索网络资源的原始连接中握手期间发送到服务器的主体。

返回:

主体发送到服务器。 对于基于 X509 的密码套件返回最终实体证书的 X500Principal,对于 Kerberos 密码套件返回 KerberosPrincipal。 如果没有发送主体,则返回 null。

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/207086.html<

(0)
运维的头像运维
上一篇2025-04-08 09:23
下一篇 2025-04-08 09:24

相关推荐

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注