Skip to content

Most visited

Recently visited

navigation
Added in API level 1

SecureCacheResponse

public abstract class SecureCacheResponse
extends CacheResponse

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


A secure cache response represents data which is originally retrieved over a secure connection. Such a connection can be secured by using a cryptographic protocol like TLS or SSL.

See also:

Summary

Public constructors

SecureCacheResponse()

Creates a new instance of this class.

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 the local certificate chain.

abstract Principal getLocalPrincipal()

Gets the local principle that the original connection sent to the server.

abstract Principal getPeerPrincipal()

Gets the server's principle.

abstract List<Certificate> getServerCertificateChain()

Gets the cached server's certificate chain.

Inherited methods

From class java.net.CacheResponse
From class java.lang.Object

Public constructors

SecureCacheResponse

Added in API level 1
SecureCacheResponse ()

Creates a new instance of this class.

Public methods

getCipherSuite

Added in API level 1
String getCipherSuite ()

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

Returns
String the cipher suite string.

getLocalCertificateChain

Added in API level 1
List<Certificate> getLocalCertificateChain ()

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

Returns
List<Certificate> the certificate chain that was sent to the server. If no certificate chain was sent, the method returns null.

getLocalPrincipal

Added in API level 1
Principal getLocalPrincipal ()

Gets the local 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
Principal the local principal object being sent to the server. Returns an X500Principal object for X509-based cipher suites. If no principal was sent, it returns null.

getPeerPrincipal

Added in API level 1
Principal getPeerPrincipal ()

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

Returns
Principal a principal object representing the server's principal.
Throws
SSLPeerUnverifiedException if the peer is unverified.

getServerCertificateChain

Added in API level 1
List<Certificate> getServerCertificateChain ()

Gets the cached server's certificate chain. 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 cipher suite is enabled. Otherwise, it throws an SSLPeerUnverifiedException.

Returns
List<Certificate> the server's certificate chain.
Throws
SSLPeerUnverifiedException if the peer is unverified.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.