APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.security.ssl

pack-priv final Class StatusResponseManager

extends Object
Class Inheritance
Imports
java.io.IOException, java.net.URI, .URISyntaxException, java.security.cert.Extension, .X509Certificate, java.util.*, java.util.concurrent.*, sun.security.provider.certpath.CertId, .OCSP, .OCSPResponse, .ResponderId, sun.security.ssl.X509Authentication.X509Possession, sun.security.util.Cache, .Debug, sun.security.x509.PKIXExtensions, .SerialNumber

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
StatusResponseManager.OCSPFetchCall

Inner Callable class that does the actual work of looking up OCSP responses, first looking at the cache and doing OCSP requests if a cache miss occurs.

pack-priv static class
StatusResponseManager.ResponseCacheEntry

Static nested class used as the data kept in the response cache.

pack-priv static class
StatusResponseManager.StaplingParameters

Inner class used to hold stapling parameters needed by the handshaker when stapling is active.

pack-priv class
StatusResponseManager.StatusInfo

Inner class used to group request and response data.

Field Summary

Modifier and TypeField and Description
private final int
private final int
private static final int
private static final int
private static final int
private final URI
private final boolean
private final Cache<CertId, StatusResponseManager.ResponseCacheEntry>
private final boolean
private final ScheduledThreadPoolExecutor

Constructor Summary

AccessConstructor and Description
pack-priv
StatusResponseManager()

Create a StatusResponseManager with default parameters.

Method Summary

Modifier and TypeMethod and Description
pack-priv Map<X509Certificate, byte[]>

Returns:

an unmodifiable Map containing the certificate and its usually
get
(CertStatusExtension.CertStatusRequestType
the type of request being made of the StatusResponseManager
type
,
CertStatusExtension.CertStatusRequest
the CertStatusRequest from the status_request or status_request_v2 ClientHello extension. A value of null is interpreted as providing no responder IDs or extensions.
request
,
X509Certificate[]
an array of 2 or more certificates. Each certificate must be issued by the next certificate in the chain.
chain
,
long
the number of time units to delay before returning responses.
delay
,
TimeUnit
the unit of time applied to the delay parameter
unit
)

Get a list of responses for a chain of certificates.

private StatusResponseManager.ResponseCacheEntry

Returns:

the ResponseCacheEntry for a specific CertId, or null if it is not found or a nonce extension has been requested by the caller.
getFromCache
(CertId
the CertId of the response to look up
cid
,
CertStatusExtension.OCSPStatusRequest
the OCSP request structure sent by the client in the TLS status_request[_v2] hello extension.
ocspRequest
)

Check the cache for a given CertId.

pack-priv URI

Returns:

a URI containing the address to the OCSP responder, or null if no AIA extension exists in the certificate and no default responder has been configured.
getURI
(X509Certificate
the subject to get the responder URI from
cert
)

Obtain the URI use by the StatusResponseManager during lookups.

pack-priv static StatusResponseManager.StaplingParameters
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cacheCapacityback to summary
private final int cacheCapacity
cacheLifetimeback to summary
private final int cacheLifetime
DEFAULT_CACHE_LIFETIMEback to summary
private static final int DEFAULT_CACHE_LIFETIME
DEFAULT_CACHE_SIZEback to summary
private static final int DEFAULT_CACHE_SIZE
DEFAULT_CORE_THREADSback to summary
private static final int DEFAULT_CORE_THREADS
defaultResponderback to summary
private final URI defaultResponder
ignoreExtensionsback to summary
private final boolean ignoreExtensions
responseCacheback to summary
private final Cache<CertId, StatusResponseManager.ResponseCacheEntry> responseCache
respOverrideback to summary
private final boolean respOverride
threadMgrback to summary
private final ScheduledThreadPoolExecutor threadMgr

Constructor Detail

StatusResponseManagerback to summary
pack-priv StatusResponseManager()

Create a StatusResponseManager with default parameters.

Method Detail

getback to summary
pack-priv Map<X509Certificate, byte[]> get(CertStatusExtension.CertStatusRequestType type, CertStatusExtension.CertStatusRequest request, X509Certificate[] chain, long delay, TimeUnit unit)

Get a list of responses for a chain of certificates. This will find OCSP responses from the cache, or failing that, directly contact the OCSP responder. It is assumed that the certificates in the provided chain are in their proper order (from end-entity to trust anchor).

Parameters
type:CertStatusExtension.CertStatusRequestType

the type of request being made of the StatusResponseManager

request:CertStatusExtension.CertStatusRequest

the CertStatusRequest from the status_request or status_request_v2 ClientHello extension. A value of null is interpreted as providing no responder IDs or extensions.

chain:X509Certificate[]

an array of 2 or more certificates. Each certificate must be issued by the next certificate in the chain.

delay:long

the number of time units to delay before returning responses.

unit:TimeUnit

the unit of time applied to the delay parameter

Returns:Map<X509Certificate, byte[]>

an unmodifiable Map containing the certificate and its usually

getFromCacheback to summary
private StatusResponseManager.ResponseCacheEntry getFromCache(CertId cid, CertStatusExtension.OCSPStatusRequest ocspRequest)

Check the cache for a given CertId.

Parameters
cid:CertId

the CertId of the response to look up

ocspRequest:CertStatusExtension.OCSPStatusRequest

the OCSP request structure sent by the client in the TLS status_request[_v2] hello extension.

Returns:StatusResponseManager.ResponseCacheEntry

the ResponseCacheEntry for a specific CertId, or null if it is not found or a nonce extension has been requested by the caller.

getURIback to summary
pack-priv URI getURI(X509Certificate cert)

Obtain the URI use by the StatusResponseManager during lookups. This method takes into account not only the AIA extension from a certificate to be checked, but also any default URI and possible override settings for the response manager.

Parameters
cert:X509Certificate

the subject to get the responder URI from

Returns:URI

a URI containing the address to the OCSP responder, or null if no AIA extension exists in the certificate and no default responder has been configured.

Exceptions
NullPointerException:
if cert is null.
processStaplingback to summary
pack-priv static StatusResponseManager.StaplingParameters processStapling(ServerHandshakeContext shc)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
sun.security.ssl back to summary

pack-priv Class StatusResponseManager.OCSPFetchCall

extends Object
implements Callable<StatusResponseManager.StatusInfo>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Callable

Inner Callable class that does the actual work of looking up OCSP responses, first looking at the cache and doing OCSP requests if a cache miss occurs.

Field Summary

Modifier and TypeField and Description
pack-priv List<Extension>
pack-priv CertStatusExtension.OCSPStatusRequest
pack-priv List<ResponderId>
pack-priv StatusResponseManager.StatusInfo

Constructor Summary

AccessConstructor and Description
public
OCSPFetchCall(StatusResponseManager.StatusInfo
the StatusInfo containing the subject certificate, CertId, and other supplemental info.
info
,
CertStatusExtension.OCSPStatusRequest
the OCSPStatusRequest containing any responder IDs and extensions.
request
)

A constructor that builds the OCSPFetchCall from the provided StatusInfo and information from the status_request[_v2] extension.

Method Summary

Modifier and TypeMethod and Description
private void
addToCache(CertId
The CertId for the OCSP response
certId
,
StatusResponseManager.ResponseCacheEntry
A cache entry containing the response bytes and the OCSPResponse built from those bytes.
entry
)

Add a response to the cache.

public StatusResponseManager.StatusInfo

Returns:

The StatusInfo object passed into the OCSPFetchCall constructor, with the responseData field filled in with the response or null if no response can be obtained.
call
()

Implements java.util.concurrent.Callable.call.

Get an OCSP response, either from the cache or from a responder.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

extensionsback to summary
pack-priv List<Extension> extensions
ocspRequestback to summary
pack-priv CertStatusExtension.OCSPStatusRequest ocspRequest
responderIdsback to summary
pack-priv List<ResponderId> responderIds
statInfoback to summary
pack-priv StatusResponseManager.StatusInfo statInfo

Constructor Detail

OCSPFetchCallback to summary
public OCSPFetchCall(StatusResponseManager.StatusInfo info, CertStatusExtension.OCSPStatusRequest request)

A constructor that builds the OCSPFetchCall from the provided StatusInfo and information from the status_request[_v2] extension.

Parameters
info:StatusResponseManager.StatusInfo

the StatusInfo containing the subject certificate, CertId, and other supplemental info.

request:CertStatusExtension.OCSPStatusRequest

the OCSPStatusRequest containing any responder IDs and extensions.

Method Detail

addToCacheback to summary
private void addToCache(CertId certId, StatusResponseManager.ResponseCacheEntry entry)

Add a response to the cache.

Parameters
certId:CertId

The CertId for the OCSP response

entry:StatusResponseManager.ResponseCacheEntry

A cache entry containing the response bytes and the OCSPResponse built from those bytes.

callback to summary
public StatusResponseManager.StatusInfo call()

Implements java.util.concurrent.Callable.call.

Get an OCSP response, either from the cache or from a responder.

Returns:StatusResponseManager.StatusInfo

The StatusInfo object passed into the OCSPFetchCall constructor, with the responseData field filled in with the response or null if no response can be obtained.

Annotations
@Override
sun.security.ssl back to summary

pack-priv Class StatusResponseManager.ResponseCacheEntry

extends Object
Class Inheritance

Static nested class used as the data kept in the response cache.

Field Summary

Modifier and TypeField and Description
pack-priv final Date
pack-priv final byte[]
pack-priv final ResponderId
pack-priv final OCSPResponse.SingleResponse
pack-priv final OCSPResponse.ResponseStatus

Constructor Summary

AccessConstructor and Description
pack-priv
ResponseCacheEntry(byte[]
the DER encoding for the OCSP response
responseBytes
,
CertId cid)

Create a new cache entry from the raw bytes of the response

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nextUpdateback to summary
pack-priv final Date nextUpdate
ocspBytesback to summary
pack-priv final byte[] ocspBytes
respIdback to summary
pack-priv final ResponderId respId
singleRespback to summary
pack-priv final OCSPResponse.SingleResponse singleResp
statusback to summary
pack-priv final OCSPResponse.ResponseStatus status

Constructor Detail

ResponseCacheEntryback to summary
pack-priv ResponseCacheEntry(byte[] responseBytes, CertId cid) throws IOException

Create a new cache entry from the raw bytes of the response

Parameters
responseBytes:byte[]

the DER encoding for the OCSP response

Exceptions
IOException:
if an OCSPResponse cannot be created from the encoded bytes.
sun.security.ssl back to summary

pack-priv final Class StatusResponseManager.StaplingParameters

extends Object
Class Inheritance

Inner class used to hold stapling parameters needed by the handshaker when stapling is active.

Field Summary

Modifier and TypeField and Description
pack-priv final Map<X509Certificate, byte[]>
pack-priv final CertStatusExtension.CertStatusRequest
pack-priv final CertStatusExtension.CertStatusRequestType
pack-priv final SSLExtension

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

responseMapback to summary
pack-priv final Map<X509Certificate, byte[]> responseMap
statReqDataback to summary
pack-priv final CertStatusExtension.CertStatusRequest statReqData
statReqTypeback to summary
pack-priv final CertStatusExtension.CertStatusRequestType statReqType
statusRespExtback to summary
pack-priv final SSLExtension statusRespExt

Constructor Detail

StaplingParametersback to summary
pack-priv StaplingParameters(SSLExtension ext, CertStatusExtension.CertStatusRequestType type, CertStatusExtension.CertStatusRequest req, Map<X509Certificate, byte[]> responses)
sun.security.ssl back to summary

pack-priv Class StatusResponseManager.StatusInfo

extends Object
Class Inheritance

Inner class used to group request and response data.

Field Summary

Modifier and TypeField and Description
pack-priv final X509Certificate
pack-priv final CertId
pack-priv final URI
pack-priv StatusResponseManager.ResponseCacheEntry

Constructor Summary

AccessConstructor and Description
pack-priv
StatusInfo(X509Certificate
the certificate to be checked for revocation
subjectCert
,
CertId
the CertId for subjectCert
certId
)

Create a StatusInfo object from an existing subject certificate and its corresponding CertId.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a String representation of this object
toString
()

Overrides java.lang.Object.toString.

Return a String representation of the StatusInfo

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

certback to summary
pack-priv final X509Certificate cert
cidback to summary
pack-priv final CertId cid
responderback to summary
pack-priv final URI responder
responseDataback to summary
pack-priv StatusResponseManager.ResponseCacheEntry responseData

Constructor Detail

StatusInfoback to summary
pack-priv StatusInfo(X509Certificate subjectCert, CertId certId)

Create a StatusInfo object from an existing subject certificate and its corresponding CertId.

Parameters
subjectCert:X509Certificate

the certificate to be checked for revocation

certId:CertId

the CertId for subjectCert

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return a String representation of the StatusInfo

Returns:String

a String representation of this object

Annotations
@Override