Class GenerateKey

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class GenerateKey
    extends Task
    Generates a key in a keystore.
    Since:
    Ant 1.2
    • Field Detail

      • alias

        protected java.lang.String alias
        The alias of signer.
      • keystore

        protected java.lang.String keystore
        The name of keystore file.
      • storepass

        protected java.lang.String storepass
      • storetype

        protected java.lang.String storetype
      • keypass

        protected java.lang.String keypass
      • sigalg

        protected java.lang.String sigalg
      • keyalg

        protected java.lang.String keyalg
      • saname

        protected java.lang.String saname
      • dname

        protected java.lang.String dname
      • keysize

        protected int keysize
      • validity

        protected int validity
      • verbose

        protected boolean verbose
    • Constructor Detail

      • GenerateKey

        public GenerateKey()
    • Method Detail

      • setDname

        public void setDname​(java.lang.String dname)
        The distinguished name for entity.
        Parameters:
        dname - distinguished name
      • setSaname

        public void setSaname​(java.lang.String saname)
        The subject alternative name for entity.
        Parameters:
        saname - subject alternative name
        Since:
        Ant 1.9.14
      • setAlias

        public void setAlias​(java.lang.String alias)
        The alias to add under.
        Parameters:
        alias - alias to add under
      • setKeystore

        public void setKeystore​(java.lang.String keystore)
        Keystore location.
        Parameters:
        keystore - location
      • setStorepass

        public void setStorepass​(java.lang.String storepass)
        Password for keystore integrity. Must be at least 6 characters long.
        Parameters:
        storepass - password
      • setStoretype

        public void setStoretype​(java.lang.String storetype)
        Keystore type.
        Parameters:
        storetype - type
      • setKeypass

        public void setKeypass​(java.lang.String keypass)
        Password for private key (if different).
        Parameters:
        keypass - password
      • setSigalg

        public void setSigalg​(java.lang.String sigalg)
        The algorithm to use in signing.
        Parameters:
        sigalg - algorithm
      • setKeyalg

        public void setKeyalg​(java.lang.String keyalg)
        The method to use when generating name-value pair.
        Parameters:
        keyalg - algorithm
      • setKeysize

        public void setKeysize​(java.lang.String keysize)
                        throws BuildException
        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

        public void setValidity​(java.lang.String validity)
                         throws BuildException
        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