public class KeyImport
extends java.lang.Object
A private key file should be an unencrypted DER encoded binary file. Its associated X.509 certificate should be a regular PEM file.
The target keystore file is supposed to be created as a JKS type file.
Constructor and Description |
---|
KeyImport() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Provides a command line driver for the private key import function.
|
public static void main(java.lang.String[] args) throws java.security.KeyStoreException, java.io.IOException, java.security.NoSuchAlgorithmException, java.security.cert.CertificateException
The command line syntax is:
KeyImport keystore-file alias private-key-file certificate-fileThe user will be prompted for the keystore password, then for the key entry password.
args
- command line arguments. See syntax description above.java.security.KeyStoreException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException