public class ConvertKeyStore
extends java.lang.Object
Usage:
java ConvertKeyStoreIf the source/target keyStore type is not specified ([ ] e.g.: java ConvertKeyStore -skstype IAIKKeyStore -tkstype PKCS12 iaikKeyStore.ks pkcs12KeyStore.p12 topSecret Options: -skstype (source keystore type) -sksprov (source keystore provider) -tkstype (target keystore type) -tksprov (target keystore provider) -v (verbose: dump progress information)
-skstype
/-tkstype
it
is tried to determine it from the source/target keyStore provider. if the source/target keyStore
provider is not specified, too, keyStore type and provider are tried to get from the KeyStore
file name endings.
Requirements: iaik_jce.jar; iaik_eccelerate.jar (if ECC keys shall be supported). If you want to use a KeyStore from any other provider you must take care to install the provider in the Java Security framework.
Constructor and Description |
---|
ConvertKeyStore(java.lang.String sourceKeyStoreType,
java.lang.String sourceKeyStoreProvider,
java.lang.String targetKeyStoreType,
java.lang.String targetKeyStoreProvider)
Creates a ConverKeyStore object with given source and target KeyStore types.
|
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(java.io.File file,
java.io.File targetDirectory)
Copies the given file to the given directory.
|
static void |
main(java.lang.String[] args)
Main method.
|
void |
setVerbose(boolean verbose)
Sets whether progress messages shall be dumped to System.out.
|
public ConvertKeyStore(java.lang.String sourceKeyStoreType, java.lang.String sourceKeyStoreProvider, java.lang.String targetKeyStoreType, java.lang.String targetKeyStoreProvider)
sourceKeyStoreType
- the type of the source KeyStoresourceKeyStoreProvider
- the source KeyStore provider, if null
the first provider is used that supports a KeyStore
of the requested formattargetKeyStoreType
- the type of the target KeyStoretargetKeyStoreProvider
- the target KeyStore provider, if null
the first provider is used that supports a KeyStore
of the requested formatpublic void setVerbose(boolean verbose)
verbose
- whether progress messages shall be dumped to System.out.public static void copyFile(java.io.File file, java.io.File targetDirectory) throws java.io.IOException
file
- The file to be copied.targetDirectory
- The directory the file should be copied to.
This can also be a regular file if the src file
should be renamed on the fly.ImportException
- If an error occurs on copying the file.java.io.IOException
public static void main(java.lang.String[] args)