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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classA class corresponding to the dname nested element.static classA DistinguishedName parameter.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected StringThe alias of signer.protected Stringprotected GenerateKey.DistinguishedNameprotected Stringprotected Stringprotected intprotected StringThe name of keystore file.protected Stringprotected Stringprotected Stringprotected Stringprotected intprotected booleanFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionDistinguished name list.voidexecute()Execute the task.voidThe alias to add under.voidThe distinguished name for entity.voidThe method to use when generating name-value pair.voidsetKeypass(String keypass) Password for private key (if different).voidsetKeysize(String keysize) Indicates the size of key generated.voidsetKeystore(String keystore) Keystore location.voidThe subject alternative name for entity.voidThe algorithm to use in signing.voidsetStorepass(String storepass) Password for keystore integrity.voidsetStoretype(String storetype) Keystore type.voidsetValidity(String validity) Indicates how many days certificate is valid.voidsetVerbose(boolean verbose) If true, verbose output when signing.Methods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
- 
Field Details- 
aliasThe alias of signer.
- 
keystoreThe name of keystore file.
- 
storepass
- 
storetype
- 
keypass
- 
sigalg
- 
keyalg
- 
saname
- 
dname
- 
expandedDname
- 
keysizeprotected int keysize
- 
validityprotected int validity
- 
verboseprotected boolean verbose
 
- 
- 
Constructor Details- 
GenerateKeypublic GenerateKey()
 
- 
- 
Method Details- 
createDnameDistinguished name list.- Returns:
- Distinguished name container.
- Throws:
- BuildException- If specified more than once or dname attribute is used.
 
- 
setDnameThe distinguished name for entity.- Parameters:
- dname- distinguished name
 
- 
setSanameThe subject alternative name for entity.- Parameters:
- saname- subject alternative name
- Since:
- Ant 1.9.14
 
- 
setAlias
- 
setKeystore
- 
setStorepassPassword for keystore integrity. Must be at least 6 characters long.- Parameters:
- storepass- password
 
- 
setStoretype
- 
setKeypassPassword for private key (if different).- Parameters:
- keypass- password
 
- 
setSigalgThe algorithm to use in signing.- Parameters:
- sigalg- algorithm
 
- 
setKeyalgThe method to use when generating name-value pair.- Parameters:
- keyalg- algorithm
 
- 
setKeysizeIndicates 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.
 
- 
setValidityIndicates how many days certificate is valid.- Parameters:
- validity- days valid
- Throws:
- BuildException- If not an Integer
 
- 
setVerbosepublic void setVerbose(boolean verbose) If true, verbose output when signing.- Parameters:
- verbose- verbose or not
 
- 
executeExecute the task.- Overrides:
- executein class- Task
- Throws:
- BuildException- on error
 
 
-