Class RevocationParameters
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
RevocationParametersExt
This class controls also the overall revocation checking process, if more then one revocation source is enabled. It is possible to choose which is tried first and whether all enabled sources must be used always (useAllEnabled). For instance, let's assume the default revocation checking order (OCSP, CRL) and that both sources are enabled. Then if OCSP returns that certificate is valid and useAllEnabled is true, also the CRL will be checked. If useAllEnabled is false, then OCSP answer will be sufficient.
Note that regardless of the useAllEnabled setting, if the first source returns that the certificate is revoked, the next one will not be used.
Finally note that the individual revocation sources settings are the most important anyway. For instance if both sources are enabled, but in non-requisite modes, then the whole revocation checking can finish in undetermined state which will be perfectly fine.
- Author:
- K. Benedyczak
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CrlCheckingMode
static final RevocationParameters
Constant which can be used to simply turn off any revocation checking.protected OCSPParametes
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, using the defaultCrlCheckingMode.IF_VALID
and defaultOCSPParametes
.RevocationParameters
(CrlCheckingMode crlCheckingMode) Deprecated.RevocationParameters
(CrlCheckingMode crlCheckingMode, OCSPParametes ocspParameters) One positive revocation source is enough to finish validation, order is set to OCSP first, then CRL.RevocationParameters
(CrlCheckingMode crlCheckingMode, OCSPParametes ocspParametes, boolean useAllEnabled, RevocationParameters.RevocationCheckingOrder order) Constructor allowing to control all settings. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone the instanceReturns the current CRL settings.Returns the current OCSP settings.getOrder()
boolean
void
setCrlCheckingMode
(CrlCheckingMode crlCheckingMode) Changes CRL settings that shall be used.void
setOcspParameters
(OCSPParametes ocspParametes) Changes OCSP settings that shall be used.void
void
setUseAllEnabled
(boolean useAllEnabled)
-
Field Details
-
IGNORE
Constant which can be used to simply turn off any revocation checking. -
crlCheckingMode
-
ocspParameters
-
useAllEnabled
protected boolean useAllEnabled -
order
-
-
Constructor Details
-
RevocationParameters
public RevocationParameters()Default constructor, using the defaultCrlCheckingMode.IF_VALID
and defaultOCSPParametes
. One positive revocation source is enough to finish validation, order is set to OCSP first, then CRL. -
RevocationParameters
Deprecated.Constructor using defaultOCSPParametes
One positive revocation source is enough to finish validation, order is set to OCSP first, then CRL.- Parameters:
crlCheckingMode
- what CRL settings shall be used
-
RevocationParameters
One positive revocation source is enough to finish validation, order is set to OCSP first, then CRL.- Parameters:
crlCheckingMode
- what CRL settings shall be usedocspParameters
- what OCSP settings shall be used
-
RevocationParameters
public RevocationParameters(CrlCheckingMode crlCheckingMode, OCSPParametes ocspParametes, boolean useAllEnabled, RevocationParameters.RevocationCheckingOrder order) Constructor allowing to control all settings.- Parameters:
crlCheckingMode
- what CRL settings shall be usedocspParametes
- what OCSP settings shall be useduseAllEnabled
- useful only if more then one revocation method is enabled. If this parameter is true then all enabled revocation sources are tried, even if the first one returns that certificate is valid.order
- in what order the configured revocations methods should be tried. Significant only if more then one source is enabled.
-
-
Method Details
-
getCrlCheckingMode
Returns the current CRL settings.- Returns:
- the current CRL settings
-
setCrlCheckingMode
Changes CRL settings that shall be used.- Parameters:
crlCheckingMode
- what CRL settings shall be used
-
getOcspParameters
Returns the current OCSP settings.- Returns:
- the current OCSP settings
-
setOcspParameters
Changes OCSP settings that shall be used.- Parameters:
ocspParametes
- what OCSP settings shall be used
-
isUseAllEnabled
public boolean isUseAllEnabled()- Returns:
- the useAllEnabled
-
setUseAllEnabled
public void setUseAllEnabled(boolean useAllEnabled) - Parameters:
useAllEnabled
- the useAllEnabled to set
-
getOrder
- Returns:
- the order
-
setOrder
- Parameters:
order
- the order to set
-
clone
Clone the instance
-