C.90 ZendGuardLicenseTask
Prev | Appendix C. Optional tasks | Next

## C.90 ZendGuardLicenseTask

The `ZendGuardLicenseTask` is a wrapper for ZendGuard `zendenc_sign` executable. It generates ZendGuard license either from a license template file or from the defined properties.

For more information about ZendGuard sign parameters see the ZendGuard documentation.

Table C.120: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`zendsignPath` | `String` | Path to zendenc_sign binary. | n/a | Yes
`privateKeyPath` | `String` | Path to the company private key. | n/a | Yes
`outputFile` | `String` | Path where should the license be generated. | n/a | Yes
`licenseTemplate` | `String` | Path to a license template file. If defined all other licensing properties will be ignored (even if they are otherwise required). | n/a | No
`productName` | `String` | Name of the product. This has to match the product name that was used to encode the files (see ZendGuardEncodeTask). | n/a | Yes
`registeredTo` | `String` | Name to which the product will be registered to. | n/a | Yes
`expires` | Mixed | This allows to define when the license will expire. The license can be issued so it either never expires or expires at a specified data. Use: `'Never'`, 0 or false to set expiry data to Never. Date in yyyy-mm-dd format to set the expiry date to a specific date. Relative format supported by strtotime function (e.g. '+6 months' to generate a license that will expire in half a year). | n/a | Yes
`ipRange` | `String` | Limits the use of the license to IP addresses that fall within specification. Supports wildcards for any of the IP place holders, as well as the two types of the net masks (e.g. 10.1.0.0/16 or 10.1.0.0./255.255.0.0). | n/a | No
`hardwareLocked` | `Boolean` | Option that indicates if the license will be locked to a specific machine using the Zend Host ID code(s). If set to true the Host-ID property is required. | `false` | No
`hostID` | `String` | Coded string (Zend Host ID) used to lock the license to a specific hardware. The Zend Host Id obtained from the machine where the encoded files and license are to be installed. Can be obtained by using the zendid utility. This is REQUIRED if the Hardware-Locked property is set to true. You can define multiple Host IDs separated by semicolon. | n/a | No
`userDefinedValues` | `String` | Optional user defined values in format key=value. Multiple key-value pairs can be defined and separated by semicolon. These values then will be part of the license and can be obtained using the zend guard api (provided by Zend Optimizer). These values CANNOT be modified after the license is generated. Their modification would invalidate the license. Example: Drink=Tea;Material=Wood | n/a | No
`xUserDefinedValues` | `String` | Optional user defined values in format key=value. Multiple key-value pairs can be defined and separated by semicolon. These values then will be part of the license and can be obtained using the zend guard api (provided by Zend Optimizer). These values CAN be modified after the license is generated. Their modification won't invalidate the license. Example: Drink=Tea;Material=Wood | n/a | No

### C.90.1 Examples

    <zendguardlicense
                privateKeyPath="/var/data/phing.key"
                zendsignPath="/usr/local/Zend/ZendGuard-5_0_1/bin/zendenc_sign"
                outputFile="./data/license/license.zl"
                productName="Phing"
                registeredTo="YourCustomerName"
                hardwareLocked="true"
                expires="+6 months"
                HostID="H:MFM43-Q9CXC-B9EDX-GWYSU;H:MFM43-Q9CXC-B9EDX-GWYTY"
                ipRange="10.1.*.*"
                userDefinedValues="Drink=Tea;Material=Wood"
                xUserDefinedValues="Drink=Tea;Material=Wood"
    />

Creates a license using the given properties.

    <zendguardlicense
                privateKeyPath="/var/data/phing.key"
                zendsignPath="/usr/local/Zend/ZendGuard-5_0_1/bin/zendenc_sign"
                outputFile="./data/license/license.zl"
                licenseTemplate="./data/license/license.template.zl"
    />

Creates a license using a license template file.

Prev | Up | Next
C.89 ZendGuardEncodeTask | Home | C.91 ZipTask