public class GenerateKey extends Task
Modifier and Type | Class and Description |
---|---|
static class |
GenerateKey.DistinguishedName
A class corresponding to the dname nested element.
|
static class |
GenerateKey.DnameParam
A DistinguishedName parameter.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
alias
The alias of signer.
|
protected java.lang.String |
dname |
protected GenerateKey.DistinguishedName |
expandedDname |
protected java.lang.String |
keyalg |
protected java.lang.String |
keypass |
protected int |
keysize |
protected java.lang.String |
keystore
The name of keystore file.
|
protected java.lang.String |
saname |
protected java.lang.String |
sigalg |
protected java.lang.String |
storepass |
protected java.lang.String |
storetype |
protected int |
validity |
protected boolean |
verbose |
description, location, project
Constructor and Description |
---|
GenerateKey() |
Modifier and Type | Method and Description |
---|---|
GenerateKey.DistinguishedName |
createDname()
Distinguished name list.
|
void |
execute()
Execute the task.
|
void |
setAlias(java.lang.String alias)
The alias to add under.
|
void |
setDname(java.lang.String dname)
The distinguished name for entity.
|
void |
setKeyalg(java.lang.String keyalg)
The method to use when generating name-value pair.
|
void |
setKeypass(java.lang.String keypass)
Password for private key (if different).
|
void |
setKeysize(java.lang.String keysize)
Indicates the size of key generated.
|
void |
setKeystore(java.lang.String keystore)
Keystore location.
|
void |
setSaname(java.lang.String saname)
The subject alternative name for entity.
|
void |
setSigalg(java.lang.String sigalg)
The algorithm to use in signing.
|
void |
setStorepass(java.lang.String storepass)
Password for keystore integrity.
|
void |
setStoretype(java.lang.String storetype)
Keystore type.
|
void |
setValidity(java.lang.String validity)
Indicates how many days certificate is valid.
|
void |
setVerbose(boolean verbose)
If true, verbose output when signing.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
protected java.lang.String alias
protected java.lang.String keystore
protected java.lang.String storepass
protected java.lang.String storetype
protected java.lang.String keypass
protected java.lang.String sigalg
protected java.lang.String keyalg
protected java.lang.String saname
protected java.lang.String dname
protected GenerateKey.DistinguishedName expandedDname
protected int keysize
protected int validity
protected boolean verbose
public GenerateKey.DistinguishedName createDname() throws BuildException
BuildException
- If specified more than once or dname
attribute is used.public void setDname(java.lang.String dname)
dname
- distinguished namepublic void setSaname(java.lang.String saname)
saname
- subject alternative namepublic void setAlias(java.lang.String alias)
alias
- alias to add underpublic void setKeystore(java.lang.String keystore)
keystore
- locationpublic void setStorepass(java.lang.String storepass)
storepass
- passwordpublic void setStoretype(java.lang.String storetype)
storetype
- typepublic void setKeypass(java.lang.String keypass)
keypass
- passwordpublic void setSigalg(java.lang.String sigalg)
sigalg
- algorithmpublic void setKeyalg(java.lang.String keyalg)
keyalg
- algorithmpublic void setKeysize(java.lang.String keysize) throws BuildException
keysize
- size of keyBuildException
- If not an Integerpublic void setValidity(java.lang.String validity) throws BuildException
validity
- days validBuildException
- If not an Integerpublic void setVerbose(boolean verbose)
verbose
- verbose or notpublic void execute() throws BuildException
execute
in class Task
BuildException
- on error