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.TaskTask to shim aroundSelfSignedCertificateGenerator.
-
-
Field Summary
Fields Modifier and Type Field Description private SelfSignedCertificateGeneratorgeneratorOur wrappedSelfSignedCertificateGenerator.
-
Constructor Summary
Constructors Constructor Description SelfSignedCertificateGeneratorTask()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute().voidsetCertificateAlg(String alg)Set the certificate algorithm that will be used.voidsetCertificateFile(File file)Set the file to which the certificate will be written.voidsetCertificateLifetime(int lifetime)Set the number of years for which the certificate will be valid.voidsetDNSSubjectAltNames(String altNames)Set the optional DNS subject alt names.voidsetHostName(String name)Set the hostname that will appear in the certificate's DN.voidsetKeySize(int size)Set the size of the generated key.voidsetKeystoreFile(File file)Set the file to which the keystore will be written.voidsetKeystorePassword(String password)Set the password for the generated keystore.voidsetKeystoreType(String type)Set the type of keystore to create.voidsetKeyType(String type)Set the type of key that will be generated.voidsetPrivateKeyFile(File file)Set the file to which the private key will be written.voidsetURISubjectAltNames(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
-
-
-
-
Field Detail
-
generator
private SelfSignedCertificateGenerator generator
Our wrappedSelfSignedCertificateGenerator.
-
-
Method Detail
-
setKeyType
public void setKeyType(@Nonnull @NotEmpty String type)
Set the type of key that will be generated. Defaults to RSA.- Parameters:
type- type of key that will be generated
-
setKeySize
public void setKeySize(@Positive int size)
Set the size of the generated key. Defaults to 2048- Parameters:
size- size of the generated key
-
setCertificateLifetime
public void setCertificateLifetime(@Positive int lifetime)
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
public void setCertificateAlg(@Nonnull @NotEmpty String alg)
Set the certificate algorithm that will be used. Defaults to SHA256withRSA.- Parameters:
alg- certificate algorithm
-
setHostName
public void setHostName(@Nonnull @NotEmpty String name)
Set the hostname that will appear in the certificate's DN.- Parameters:
name- hostname that will appear in the certificate's DN
-
setPrivateKeyFile
public void setPrivateKeyFile(@Nullable File file)Set the file to which the private key will be written.- Parameters:
file- file to which the private key will be written
-
setCertificateFile
public void setCertificateFile(@Nullable File file)Set the file to which the certificate will be written.- Parameters:
file- file to which the certificate will be written
-
setKeystoreType
public void setKeystoreType(@Nonnull @NotEmpty String type)
Set the type of keystore to create.- Parameters:
type- keystore type
-
setKeystoreFile
public void setKeystoreFile(@Nullable File file)Set the file to which the keystore will be written.- Parameters:
file- file to which the keystore will be written
-
setKeystorePassword
public void setKeystorePassword(@Nullable String password)Set the password for the generated keystore.- Parameters:
password- password for the generated keystore
-
setDNSSubjectAltNames
public void setDNSSubjectAltNames(@Nonnull @NonnullElements String altNames)
Set the optional DNS subject alt names.- Parameters:
altNames- collection of subject alt names.
-
setURISubjectAltNames
public void setURISubjectAltNames(@Nonnull @NonnullElements String subjectAltNames)
Set the optional URI subject alt names.- Parameters:
subjectAltNames- collection of subject alt names.
-
execute
public void execute()
.- Overrides:
executein classorg.apache.tools.ant.Task
-
-