Modifier and Type | Class and Description |
---|---|
static class |
Platform.KeyType
Key size, key algorithm and signature algorithms used.
|
Modifier and Type | Field and Description |
---|---|
static String |
JAVA_MINIMUM_VERSION_NUMBER
The minimum java supported version.
|
Modifier and Type | Method and Description |
---|---|
static void |
addCertificate(KeyStore ks,
String ksType,
String ksPath,
String alias,
char[] pwd,
String certPath)
Add the certificate in the specified path to the provided keystore;
creating the keystore with the provided type and path if it doesn't exist.
|
static int |
computeNumberOfThreads(int minimumValue,
float cpuMultiplier)
Computes the number of replay/worker/cleaner threads based on the number of cpus in the system.
|
static void |
deleteAlias(KeyStore ks,
String ksPath,
String alias,
char[] pwd)
Delete the specified alias from the provided keystore.
|
static void |
generateSelfSignedCertificate(KeyStore ks,
String ksType,
String ksPath,
Platform.KeyType keyType,
String alias,
char[] pwd,
String dn,
int validity)
Generate a self-signed certificate using the specified alias, dn string and
validity period.
|
static boolean |
isVendor(String vendor)
Test if a platform java vendor property starts with the specified vendor
string.
|
public static final String JAVA_MINIMUM_VERSION_NUMBER
public static void addCertificate(KeyStore ks, String ksType, String ksPath, String alias, char[] pwd, String certPath) throws KeyStoreException
ks
- The keystore to add the certificate to, may be null if it doesn't
exist.ksType
- The type to use if the keystore is created.ksPath
- The path to the keystore if it is created.alias
- The alias to store the certificate under.pwd
- The password to use in saving the certificate.certPath
- The path to the file containing the certificate.KeyStoreException
- If an error occurred adding the certificate to the keystore.public static void deleteAlias(KeyStore ks, String ksPath, String alias, char[] pwd) throws KeyStoreException
ks
- The keystore to delete the alias from.ksPath
- The path to the keystore.alias
- The alias to use in the request generation.pwd
- The keystore password to use.KeyStoreException
- If an error occurred deleting the alias.public static void generateSelfSignedCertificate(KeyStore ks, String ksType, String ksPath, Platform.KeyType keyType, String alias, char[] pwd, String dn, int validity) throws KeyStoreException
ks
- The keystore to save the certificate in. May be null if it does
not exist.keyType
- The keystore type to use if the keystore is created.ksPath
- The path to the keystore if the keystore is created.ksType
- Specify the key size, key algorithm and signature algorithms used.alias
- The alias to store the certificate under.pwd
- The password to us in saving the certificate.dn
- The dn string used as the certificate subject.validity
- The validity of the certificate in days.KeyStoreException
- If the self-signed certificate cannot be generated.public static boolean isVendor(String vendor)
vendor
- The vendor to check for.true
if the java vendor starts with the specified vendor
string.public static int computeNumberOfThreads(int minimumValue, float cpuMultiplier)
minimumValue
- at least this value should be returned.cpuMultiplier
- the scaling multiplier of the number of threads to returnIllegalArgumentException
- if cpuMultiplier
is a non positive numberCopyright © 2010-2017 ForgeRock AS. All Rights Reserved.