Class SelfSignedCertificateGeneratorTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
net.shibboleth.idp.installer.ant.impl.SelfSignedCertificateGeneratorTask
- All Implemented Interfaces:
Cloneable
public class SelfSignedCertificateGeneratorTask
extends org.apache.tools.ant.Task
Task to shim around
SelfSignedCertificateGenerator
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SelfSignedCertificateGenerator
Our wrappedSelfSignedCertificateGenerator
.Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
.void
setCertificateAlg
(String alg) Set the certificate algorithm that will be used.void
setCertificateFile
(File file) Set the file to which the certificate will be written.void
setCertificateLifetime
(int lifetime) Set the number of years for which the certificate will be valid.void
setDNSSubjectAltNames
(String altNames) Set the optional DNS subject alt names.void
setHostName
(String name) Set the hostname that will appear in the certificate's DN.void
setKeySize
(int size) Set the size of the generated key.void
setKeystoreFile
(File file) Set the file to which the keystore will be written.void
setKeystorePassword
(String password) Set the password for the generated keystore.void
setKeystoreType
(String type) Set the type of keystore to create.void
setKeyType
(String type) Set the type of key that will be generated.void
setPrivateKeyFile
(File file) Set the file to which the private key will be written.void
setURISubjectAltNames
(String subjectAltNames) Set the optional URI subject alt names.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
-
generator
Our wrappedSelfSignedCertificateGenerator
.
-
-
Constructor Details
-
SelfSignedCertificateGeneratorTask
public SelfSignedCertificateGeneratorTask()Constructor.
-
-
Method Details
-
setKeyType
Set the type of key that will be generated. Defaults to RSA.- Parameters:
type
- type of key that will be generated
-
setKeySize
Set the size of the generated key. Defaults to 2048- Parameters:
size
- size of the generated key
-
setCertificateLifetime
Set the number of years for which the certificate will be valid.- Parameters:
lifetime
- number of years for which the certificate will be valid
-
setCertificateAlg
Set the certificate algorithm that will be used. Defaults to SHA256withRSA.- Parameters:
alg
- certificate algorithm
-
setHostName
Set the hostname that will appear in the certificate's DN.- Parameters:
name
- hostname that will appear in the certificate's DN
-
setPrivateKeyFile
Set the file to which the private key will be written.- Parameters:
file
- file to which the private key will be written
-
setCertificateFile
Set the file to which the certificate will be written.- Parameters:
file
- file to which the certificate will be written
-
setKeystoreType
Set the type of keystore to create.- Parameters:
type
- keystore type
-
setKeystoreFile
Set the file to which the keystore will be written.- Parameters:
file
- file to which the keystore will be written
-
setKeystorePassword
Set the password for the generated keystore.- Parameters:
password
- password for the generated keystore
-
setDNSSubjectAltNames
Set the optional DNS subject alt names.- Parameters:
altNames
- collection of subject alt names.
-
setURISubjectAltNames
Set the optional URI subject alt names.- Parameters:
subjectAltNames
- collection of subject alt names.
-
execute
public void execute().- Overrides:
execute
in classorg.apache.tools.ant.Task
-