In this chapter's project code, we'll follow two of the four licensing steps discussed in the section "The Library Licensing System," earlier in this chapter: generating the license file and using the license file. The design we created previously is good enough for our needs, although we still need to record it in the project's technical documentation. We won't formally install the license file until we create the setup program in Chapter 25.
Since we'll be adding a new external file that will be processed by the Library Project, we need to document its structure in the project's Technical Resource Kit. Let's add the following new section to that document.
The Library Project reads a customer-specific license file generated by the Library License Generation support application. That program generates a digitally signed XML license file that includes licensee information. Here is a sample of the license file content:
<?xml version="1.0"?> <License> <Product>Library Project</Product> <LicenseDate>1/1/2000</LicenseDate> <ExpireDate>12/31/2999</ExpireDate> <CoveredVersion>1.*</CoveredVersion> <Licensee>John Q. Public</Licensee> <SerialNumber>LIB-123456789</SerialNumber> <Signature>
Digital signature appears here (not shown)</Signature> </License>
<ExpireDate> tags indicate the first and last valid dates of the license.
<Licensee> indicates the name of the license owner.
<SerialNumber> includes the vendor-defined serial ...