public class KeyStoreUtil
extends java.lang.Object
This class provides several utilities to KeyStore.
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
expandArgs(java.lang.String tool,
java.lang.String file,
java.lang.String c1,
java.lang.String c2,
java.lang.String[] args)
Prepends matched options from a pre-configured options file.
|
static java.lang.String |
getCacerts()
Returns the file name of the keystore with the configured CA certificates.
|
static char[] |
getPassWithModifier(java.lang.String modifier,
java.lang.String arg,
java.util.ResourceBundle rb,
java.text.Collator collator) |
static boolean |
isSelfSigned(java.security.cert.X509Certificate cert)
Returns true if the certificate is self-signed, false otherwise.
|
static boolean |
isWindowsKeyStore(java.lang.String storetype)
Returns true if KeyStore has a password.
|
static java.lang.String |
niceStoreTypeName(java.lang.String storetype)
Returns standard-looking names for storetype
|
static boolean |
signedBy(java.security.cert.X509Certificate end,
java.security.cert.X509Certificate ca) |
public static boolean isSelfSigned(java.security.cert.X509Certificate cert)
public static boolean signedBy(java.security.cert.X509Certificate end,
java.security.cert.X509Certificate ca)
public static boolean isWindowsKeyStore(java.lang.String storetype)
public static java.lang.String niceStoreTypeName(java.lang.String storetype)
public static java.lang.String getCacerts()
public static char[] getPassWithModifier(java.lang.String modifier,
java.lang.String arg,
java.util.ResourceBundle rb,
java.text.Collator collator)
public static java.lang.String[] expandArgs(java.lang.String tool,
java.lang.String file,
java.lang.String c1,
java.lang.String c2,
java.lang.String[] args)
throws java.io.IOException,
PropertyExpander.ExpandException
tool - the name of the tool, can be "keytool" or "jarsigner"file - the pre-configured options filec1 - the name of the command, with the "-" prefix,
must not be nullc2 - the alternative command name, with the "-" prefix,
null if none. For example, "genkey" is alt name for
"genkeypair". A command can only have one alt name now.args - existing argumentsjava.io.IOException - if there is a file I/O or format errorPropertyExpander.ExpandException - if there is a property expansion error