加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090228220227/http://developer.android.com:80/reference/java/net/SecureCacheResponse.html
public abstract class

SecureCacheResponse

extends CacheResponse
java.lang.Object
   ↳ java.net.CacheResponse
     ↳ java.net.SecureCacheResponse

Class Overview

A secure cache response, which is orignally retrieved through secure ways.

Summary

Public Constructors
SecureCacheResponse()
Constructor method
Public Methods
abstract String getCipherSuite()
Gets the cipher suite string on the connection which is originally used to retrieve the network resource.
abstract List<Certificate> getLocalCertificateChain()
Gets local certificate chain.
abstract Principal getLocalPrincipal()
Gets the Principle that the original connection sent to the server.
abstract Principal getPeerPrincipal()
Gets the server's Principle.
abstract List<Certificate> getServerCertificateChain()
Gets server's certificate chain from cache.
[Expand]
Inherited Methods
From class java.net.CacheResponse
From class java.lang.Object

Public Constructors

public SecureCacheResponse ()

Constructor method

Public Methods

public abstract String getCipherSuite ()

Gets the cipher suite string on the connection which is originally used to retrieve the network resource.

Returns
  • the cipher suite string

public abstract List<Certificate> getLocalCertificateChain ()

Gets local certificate chain. When the original connection retrieved the resource data, certificate chain was sent to the server during handshaking process. This method only takes effect when certificate-based cipher suite is enabled.

Returns
  • the certificate chain that was sent to the server. The certificate chain is represented as a List of Certificate. If no certificate chain was sent, the method returns null.

public abstract Principal getLocalPrincipal ()

Gets the Principle that the original connection sent to the server. When the original connection fetched the network resource, the Principle was sent to the server during handshaking process.

Returns
  • the principal sent to the server. Returns an X500Principal for X509-based cipher suites. If no principal was sent, it returns null.

public abstract Principal getPeerPrincipal ()

Gets the server's Principle. When the original connection retrieved network resource, the principle was established when defining the session.

Returns
  • an Principal represents the server's principal.
Throws
SSLPeerUnverifiedException If the peer is unverified.

public abstract List<Certificate> getServerCertificateChain ()

Gets server's certificate chain from cache. As part of defining the session, the certificate chain was established when the original connection retrieved network resource. This method can only be invoked when certificated-based cypher suites is enable. Otherwise, it throws an SSLPeerUnverifiedException.

Returns
  • The server's certificate chain, which is represented as a List of Certificate.
Throws
SSLPeerUnverifiedException If the peer is unverified.