Package org.apache.tools.ant.taskdefs
Class GenerateKey
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.GenerateKey
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A class corresponding to the dname nested element.static class
A DistinguishedName parameter. -
Field Summary
Modifier and TypeFieldDescriptionprotected String
The alias of signer.protected String
protected GenerateKey.DistinguishedName
protected String
protected String
protected int
protected String
The name of keystore file.protected String
protected String
protected String
protected String
protected int
protected boolean
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDistinguished name list.void
execute()
Execute the task.void
The alias to add under.void
The distinguished name for entity.void
The method to use when generating name-value pair.void
setKeypass
(String keypass) Password for private key (if different).void
setKeysize
(String keysize) Indicates the size of key generated.void
setKeystore
(String keystore) Keystore location.void
The subject alternative name for entity.void
The algorithm to use in signing.void
setStorepass
(String storepass) Password for keystore integrity.void
setStoretype
(String storetype) Keystore type.void
setValidity
(String validity) Indicates how many days certificate is valid.void
setVerbose
(boolean verbose) If true, verbose output when signing.Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
alias
The alias of signer. -
keystore
The name of keystore file. -
storepass
-
storetype
-
keypass
-
sigalg
-
keyalg
-
saname
-
dname
-
expandedDname
-
keysize
protected int keysize -
validity
protected int validity -
verbose
protected boolean verbose
-
-
Constructor Details
-
GenerateKey
public GenerateKey()
-
-
Method Details
-
createDname
Distinguished name list.- Returns:
- Distinguished name container.
- Throws:
BuildException
- If specified more than once or dname attribute is used.
-
setDname
The distinguished name for entity.- Parameters:
dname
- distinguished name
-
setSaname
The subject alternative name for entity.- Parameters:
saname
- subject alternative name- Since:
- Ant 1.9.14
-
setAlias
-
setKeystore
-
setStorepass
Password for keystore integrity. Must be at least 6 characters long.- Parameters:
storepass
- password
-
setStoretype
-
setKeypass
Password for private key (if different).- Parameters:
keypass
- password
-
setSigalg
The algorithm to use in signing.- Parameters:
sigalg
- algorithm
-
setKeyalg
The method to use when generating name-value pair.- Parameters:
keyalg
- algorithm
-
setKeysize
Indicates the size of key generated.- Parameters:
keysize
- size of key- Throws:
BuildException
- If not an Integer- To do:
- Could convert this to a plain Integer setter.
-
setValidity
Indicates how many days certificate is valid.- Parameters:
validity
- days valid- Throws:
BuildException
- If not an Integer
-
setVerbose
public void setVerbose(boolean verbose) If true, verbose output when signing.- Parameters:
verbose
- verbose or not
-
execute
Execute the task.- Overrides:
execute
in classTask
- Throws:
BuildException
- on error
-