Package com.isode.dsapi.profile
Class BindProfileUtils
java.lang.Object
com.isode.dsapi.profile.BindProfileUtils
General utility class for bind profile
- Since:
- 16.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Remove certificate corresponding to given key from the trust store if it is not used any where in the bind profile.static int
cleanUpIdentities
(boolean clean) Determine the number of identity files that are no longer referenced by any of the bind profiles and remove them if required.static Map<String,
SSLCertificate> cleanUpTrustAnchors
(boolean clean) Determine list of trusted certificate files that are no longer referenced by any of the bind profiles and remove them if required.static void
copySettings
(BindProfile oldBP, BindProfile newBP) Copies the settings (that is, at the time of writing, the single value, mutli value andAttributeBlock
in the bind profile) from oneBindProfile
to another.
-
Constructor Details
-
BindProfileUtils
public BindProfileUtils()
-
-
Method Details
-
cleanUpIdentities
public static int cleanUpIdentities(boolean clean) Determine the number of identity files that are no longer referenced by any of the bind profiles and remove them if required.This will find any P12 files from the Identities directory which are not referenced by any bind profile.
- Parameters:
clean
- true to remove the identities not referenced and false to just return the number of such identities- Returns:
- number of unreferenced identities
- Since:
- 14.6
-
cleanUpTrustAnchors
Determine list of trusted certificate files that are no longer referenced by any of the bind profiles and remove them if required.This will find any trusted certificates files from the Trust Store directory which are not referenced by any bind profile.
- Parameters:
clean
- true to remove the trusted certificates not referenced and false to just return the list of such certificates- Returns:
- unreferenced trusted certificates
- Since:
- 16.3
-
checkAndRemoveCertFromTrustStore
Remove certificate corresponding to given key from the trust store if it is not used any where in the bind profile.- Parameters:
key
- key referring to certificate to be removed, not null- Throws:
IOException
- if there was an error while removing the certificate from the trust store.- Since:
- 16.3
-
copySettings
Copies the settings (that is, at the time of writing, the single value, mutli value andAttributeBlock
in the bind profile) from oneBindProfile
to another.- Parameters:
oldBP
- TheBindProfile
to copy the values from, should not benull
.newBP
- TheBindProfile
to copy the values to, should not benull
.- Since:
- 17.0
-