SoftwareShield
System Feature Guide > Expiring Licenses
Expiring LicensesOne of the most important and commonly used features of the SoftwareShield System is expiring licenses. The comprehensive expiration system can be used by your software alone or in combination with any of the other features to give you a wide variety of possible licensing models. There are three ways a license can be made to expire. These methods are covered individually in detail in the following sub-sections: Both Expire Period and Hard Expire Date cause the license to expire based on the passage of time, regardless of usage. The Execution Limit causes the license to expire not based on time, but rather on how many times the software has been used. When you choose to make your license expire, you may use any of the three types of expiration alone or in any combination with each other. While possible, using more than one expiration type at a time in a single license is generally not recommended because of the possible complexity introduced. If more than one expiration type is used at the same time in the same license, the license will effectively expire whichever expiration comes soonest. If a license is currently under the effect of an expiration of any type, regardless of if it has expired or not, the license is said to be in Expire Mode. When you issue an Activation Code for a Release All Expiration Authorization Definition, you remove the license from Expire Mode. Once removed, the license can not be placed back into Expire Mode. Authorization Definitions which can be used to manipulate the expiration of your license are: Each license in Expire Mode also uses a special internal field: Last Used Date/Time. One of the purposes of this field is to prevent a common pre-backdating attack on an expiring license. This field is stored in UTC time, so is not affected by daylight savings time or time zone differences between the client machine and the server machine where Activation Codes may be generated. See the Last Used Date/Time subsection for more information. It is also updated every time an Expire Mode license runs and used in conjunction with the mechanism that detects if the system clock has been rolled-back. Since the most common attack on an Expire Mode license is turning the system clock back to gain additional usage, the ClientProtector detects if time has moved backward since it was last started on a particular license. If detected, it will return a special code (FALSE_CLOCK_TURNED_BACK) to your software that will allow you to (optionally) prompt the user to correct their clock. Unlike other possible inconsistent states of a license, when the clock is detected to have been turned back, the license cannot be "recovered" until the clock is corrected. (See License Recovery for more information). At run-time you can easily get the expiration date and time (if any), check to see if the license is in expire mode, get the execution count, execution limit and the executions remaining (if applicable) all from function calls to the ClientProtector. Checking the expiration state of your license primarily occurs in the ClientProtector StartUp function. For a view of the logical flow of control, see the SoftwareShield ClientProtector Control Flow-Charts. More InformationFor help on actually setting your license to expire as well as setting your Last Used Date/Time, see Expiration Tab in the SoftwareShield License Manager Reference. For help on actually getting expiration information from the ClientProtector regarding dates and counts see the following functions in the SoftwareShield ClientProtector Reference: GetExpireDate, GetHardExpireDate, GetPeriodExpireDate, GetExecutionsRemaining, GetExecutionLimit, GetExecutionCount. |