企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# C.118 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](http://static.zend.com/topics/Zend-Guard-User-Guidev5x.pdf). Table C.152:聽Attributes NameTypeDescriptionDefaultRequired`zendsignPath``String`Path to zendenc\_sign binary.n/aYes`privateKeyPath``String`Path to the company private key. n/aYes`outputFile``String`Path where should the license be generated.n/aYes`licenseTemplate``String`Path to a license template file. If defined all other licensing properties will be ignored (even if they are otherwise required).n/aNo`productName``String`Name of the product. This has to match the product name that was used to encode the files (see ZendGuardEncodeTask).n/aYes`registeredTo``String`Name to which the product will be registered to.n/aYes`expires`MixedThis 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/aYes`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/aNo`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/aNo`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=Woodn/aNo`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=Woodn/aNo C.118.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.