public final class KeyCreatorCommand
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.Integer>
Alternative to using this is using openssl : `openssl genrsa -out /tmp/mydomain.com-key.pem 4096`
Constructor and Description |
---|
KeyCreatorCommand() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
call()
Uses arguments passed to do all keypair creation.
|
static java.security.KeyPair |
doKeyCreation(java.lang.String keyLocation,
java.lang.String keyName)
Create a keypair with a default size of 4096 bits.
|
static java.security.KeyPair |
doKeyCreation(java.lang.String keyLocation,
java.lang.String keyName,
int keySize)
Do the keypair creation.
|
static void |
main(java.lang.String[] args)
Public interface for creating keypairs, arguments will be passed.
|
public static void main(java.lang.String[] args)
args
- arguments as defined abovepublic java.lang.Integer call()
call
in interface java.util.concurrent.Callable<java.lang.Integer>
public static java.security.KeyPair doKeyCreation(java.lang.String keyLocation, java.lang.String keyName) throws java.io.IOException
keyLocation
- output directory for keykeyName
- name of keypair filejava.io.IOException
- Failed to get/create keypair from diskpublic static java.security.KeyPair doKeyCreation(java.lang.String keyLocation, java.lang.String keyName, int keySize) throws java.io.IOException
keyLocation
- Output location for the keypairkeyName
- Name of the keypair filekeySize
- Size of the keypairjava.io.IOException
- Failed to get/create keypair from disk