Package eu.emi.security.authn.x509
Class OCSPParametes
java.lang.Object
eu.emi.security.authn.x509.OCSPParametes
Manages configuration of OCSP support for all truststores.
- Author:
- K. Benedyczak
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected OCSPCheckingMode
protected int
static final int
static final int
protected String
protected OCSPResponder[]
protected boolean
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor usingOCSPCheckingMode.IF_AVAILABLE
.OCSPParametes
(OCSPCheckingMode checkingMode) Constructor without any local responders and default settings.OCSPParametes
(OCSPCheckingMode checkingMode, OCSPResponder localResponder) Uses default settings for timeout (DEFAULT_TIMEOUT
), and cache (DEFAULT_CACHE
and no disk persistence of cached responses), prefers local responders, do not sign requests and do not use nonce.OCSPParametes
(OCSPCheckingMode checkingMode, OCSPResponder[] localResponders, int conntectTimeout, boolean preferLocalResponders, boolean useNonce, int cacheTtl, String diskCachePath) Full constructorOCSPParametes
(OCSPCheckingMode checkingMode, OCSPResponder[] localResponders, int cacheTtl, String diskCachePath) Uses default settings for timeout (DEFAULT_TIMEOUT
), prefers local responders, do not sign requests and do not use nonce. -
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
boolean
void
setCacheTtl
(int cacheTtl) void
setCheckingMode
(OCSPCheckingMode checkingMode) void
setConntectTimeout
(int conntectTimeout) void
setDiskCachePath
(String diskCachePath) void
setLocalResponders
(OCSPResponder[] localResponders) void
setPreferLocalResponders
(boolean preferLocalResponders) void
setUseNonce
(boolean useNonce)
-
Field Details
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT- See Also:
-
DEFAULT_CACHE
public static final int DEFAULT_CACHE- See Also:
-
checkingMode
-
localResponders
-
conntectTimeout
protected int conntectTimeout -
preferLocalResponders
protected boolean preferLocalResponders -
useNonce
protected boolean useNonce -
cacheTtl
protected int cacheTtl -
diskCachePath
-
-
Constructor Details
-
OCSPParametes
public OCSPParametes()Default constructor usingOCSPCheckingMode.IF_AVAILABLE
.- See Also:
-
OCSPParametes
Constructor without any local responders and default settings.- Parameters:
checkingMode
- general checking mode- See Also:
-
OCSPParametes
Uses default settings for timeout (DEFAULT_TIMEOUT
), and cache (DEFAULT_CACHE
and no disk persistence of cached responses), prefers local responders, do not sign requests and do not use nonce. Uses only a single local responder.- Parameters:
checkingMode
- general checking modelocalResponder
- a single local responder
-
OCSPParametes
public OCSPParametes(OCSPCheckingMode checkingMode, OCSPResponder[] localResponders, int cacheTtl, String diskCachePath) Uses default settings for timeout (DEFAULT_TIMEOUT
), prefers local responders, do not sign requests and do not use nonce.- Parameters:
checkingMode
- general checking modelocalResponders
- list of local responders (can be empty, but not null)cacheTtl
- maximum time after each cached response expires. Negative for no cache at all, 0 for no limit (i.e. caching time will be only controlled by the OCSP response validity period). In s.diskCachePath
- if not null, cached responses will be stored on disk.
-
OCSPParametes
public OCSPParametes(OCSPCheckingMode checkingMode, OCSPResponder[] localResponders, int conntectTimeout, boolean preferLocalResponders, boolean useNonce, int cacheTtl, String diskCachePath) Full constructor- Parameters:
checkingMode
- general checking modelocalResponders
- list of local responders (can be empty, but not null)conntectTimeout
- OCSP responder connection and communication timeoutpreferLocalResponders
- whether to prefer locally defined responders over certificate-defined responderuseNonce
- whether to use in request and require in response the noncecacheTtl
- maximum time after each cached response expires. Negative for no cache at all, 0 for no limit (i.e. caching time will be only controlled by the OCSP response validity period). In s.diskCachePath
- if not null, cached responses will be stored on disk.
-
-
Method Details
-
getCheckingMode
- Returns:
- the checkingMode
-
setCheckingMode
- Parameters:
checkingMode
- the checkingMode to set
-
getLocalResponders
- Returns:
- the localResponders
-
setLocalResponders
- Parameters:
localResponders
- the localResponders to set
-
getConntectTimeout
public int getConntectTimeout()- Returns:
- the conntectTimeout
-
setConntectTimeout
public void setConntectTimeout(int conntectTimeout) - Parameters:
conntectTimeout
- the conntectTimeout to set
-
isPreferLocalResponders
public boolean isPreferLocalResponders()- Returns:
- the preferLocalResponders
-
setPreferLocalResponders
public void setPreferLocalResponders(boolean preferLocalResponders) - Parameters:
preferLocalResponders
- the preferLocalResponders to set
-
isUseNonce
public boolean isUseNonce()- Returns:
- the useNonce
-
setUseNonce
public void setUseNonce(boolean useNonce) - Parameters:
useNonce
- the useNonce to set
-
getCacheTtl
public int getCacheTtl()- Returns:
- the cacheTtl
-
setCacheTtl
public void setCacheTtl(int cacheTtl) - Parameters:
cacheTtl
- the cacheTtl to set
-
getDiskCachePath
- Returns:
- the diskCachePath
-
setDiskCachePath
- Parameters:
diskCachePath
- the diskCachePath to set
-