Package com.isode.dsapi.config
Class OCSPService
java.lang.Object
com.isode.dsapi.config.ManagedObject
com.isode.dsapi.config.OCSPService
This class wraps the OCSP configuration entry.
- Since:
- 16.2
-
Field Summary
Fields inherited from class com.isode.dsapi.config.ManagedObject
logger
-
Constructor Summary
ConstructorsConstructorDescriptionOCSPService
(Entry entry, IsodeDirectorySession ds) Construct from the entry object. -
Method Summary
Modifier and TypeMethodDescriptionstatic OCSPService
create
(IsodeDirectorySession ds, DN entryDN, byte[] ber, String p12file, String pphrfile, String description) Create an OCSP service configuration object and add the corresponding entry.getCADN()
byte[]
Get the next update to be specified in the OCSP responsevoid
Load values from an entry.void
setIssuerCertificate
(byte[] ber) Set the issuer certificate (as bytes).void
setNextUpdate
(Integer nextUpdate) Set the next update field of an OCSP responsevoid
setP12File
(String path) Set the P12 file name.void
setPPHRFile
(String path) Set the P12 passphrase file name.toString()
Methods inherited from class com.isode.dsapi.config.ManagedObject
addAttribute, addAttribute, addAttribute, addAttributeValue, addAttributeValue, addEntry, addOC, checkMandatory, checkMandatory, checkMandatory, checkMandatory, commit, commitNoRefresh, createAP, createAttributeType, createDN, createPA, createRDN, createRDN, getAttribute, getAttributeDefaultWhenNull, getDN, getIsodeDirectorySession, getMultiValueBer, getMultiValuedInteger, getMultiValuedInteger, getMultiValuedString, getMultiValuedString, getPA, getValue, getValueAttrTypeFromOID, getValueBer, getValueBoolean, getValueDate, getValueDate, getValueDN, getValueInteger, getValueInteger, getValueString, getValueString, getValueStringFromAttribute, hasAttributeChanged, hasChanges, remove, removeAttr, removeStringValue, reset, reset, updateAttr, updateAttr, updateAttr, updateBoolean, updateDN, updateInteger, updateMultiValuedBER, updateMultiValuedInteger, updateMultiValuedString, updatePA, updatePA, updateString
-
Constructor Details
-
OCSPService
Construct from the entry object.- Parameters:
entry
- Entry representing the OCSP service entry.ds
- Isode directory session- Throws:
ConfigOpFailedException
- if mandatory attributes are not loaded
-
-
Method Details
-
load
Description copied from class:ManagedObject
Load values from an entry. No directory operation should be done in this method.Mandatory variables are assigned only after everything is ok. This is done so during re-loading, if there are exceptions and even then the object is used, there is no crash by using mandatory variables that are assumed to have non-null values.
- Specified by:
load
in classManagedObject
- Parameters:
entry
- Entry representing the object, could be null if the existing entry has to be reloaded- Throws:
ConfigOpFailedException
- if mandatory attributes are not loaded
-
create
public static OCSPService create(IsodeDirectorySession ds, DN entryDN, byte[] ber, String p12file, String pphrfile, String description) throws ConfigOpFailedException, ReadFailedException Create an OCSP service configuration object and add the corresponding entry.- Parameters:
ds
- Isode directory session, must not be null.entryDN
- Service DN, must not be null.ber
- Issuer certificate BER bytes, must not be null.p12file
- P12 private key path, must not be null.pphrfile
- P12 private key passphrase file path, must not be null.description
- Description, may be null.- Returns:
- The created OCSPService object.
- Throws:
ReadFailedException
- if there is a problem on reading the committed entry back.ConfigOpFailedException
- if there is any other problem in create the OCSP service configuration object or entry.
-
getServiceName
- Returns:
- The service name, or null if no value.
-
getP12File
- Returns:
- The P12 file name, or null if no value.
-
setP12File
Set the P12 file name.- Parameters:
path
- New path name (relative to the DSA directory). A value of null indicates that the attribute should be removed.- Throws:
BadValueException
- if path is not a valid LDAP string representation for P12 filename
-
getPPHRFile
- Returns:
- The P12 passphrase file name, or null if no value.
-
setPPHRFile
Set the P12 passphrase file name.- Parameters:
path
- New path name (relative to the DSA directory). A value of null indicates that the attribute should be removed.- Throws:
BadValueException
- if path is not a valid LDAP string representation for P12 passphrase filename
-
getCADN
- Returns:
- The CA DN, or null if no value.
-
getIssuerCertificate
public byte[] getIssuerCertificate()- Returns:
- The issuer certificate (as bytes), or null if no value.
-
setIssuerCertificate
Set the issuer certificate (as bytes).- Parameters:
ber
- Issuer certificate as bytes. The bytes are encoded to a certificate to verify the contents. A value of null indicates that the attribute should be removed.- Throws:
BadValueException
- if the value specified is invalid for the certificate attribute type
-
getNextUpdate
Get the next update to be specified in the OCSP response- Returns:
- next update, can be null
- Since:
- 16.3
-
setNextUpdate
Set the next update field of an OCSP response- Parameters:
nextUpdate
- next update, can be null- Since:
- 16.3
-
toString
-