Configuring and Building a VCG

 
VCG v6.2.1

The vendor certificate generator (VCG) is the component of the FLEXnet Operations System that generates license certificates from PRDs. VCG v6.2.1 is built with FLEXnet Licensing v10.1.3.

VCG v6.2.1 does not support IPv6. If you need a version of the VCG that supports IPv6, do not upgrade the VCG to v6.2.1.


Before its v10.0 release, FLEXnet Licensing was known as FLEXlm. Tamper Resistant Licenses (TRL) are referred to as the Counterfeit Resistant Option (CRO) in FLEXnet Licensing releases previous to v10.0.


You must build a VCG on each platform on which you run a FLEXnet Operations client from which licenses will be generated and on the platform(s) on which you run the Customer Portal and the Fulfillment service.  The VCG kit contains the source files for all of the platforms on which the FLEXnet Operations System is supported.  First, configure the VCG source files, then build one or more platform-specific VCGs using a C compiler.  After you build one or more VCGs, import a platform-specific VCG into an Operations client running from each client, Customer Portal, and Integration services installation from which licenses will be generated.

Configuring the VCG

    1. Change the directory to vcg/version/machind, and open vcg_code.h.  This file should be kept as secret as your FLEXnet Licensing lm_code.h file.  Set the following values:
      • VENDOR_NAME  This is the name of your FLEXnet Licensing vendor daemon.  If on Windows, do not include the .exe file extension.  This value is also set in your FLEXnet Licensing toolkit, in machind/lm_code.h.

        Example: If your FLEXnet Licensing vendor daemon name is "mycorpd," you would change the line:

            #define VENDOR_NAME "demo"
            to:
            #define VENDOR_NAME "mycorpd"

      • VENDOR_VERSION  This is the version number of your VCG for your own use.  It may be set to any alphanumeric string.  The vcg_name version command prints the version of the VCG kit, VENDOR_NAME, and VENDOR_VERSION.  

      • Encryption Seeds  What kind (ENCRYPTION_SEEDs and/or LM_SEEDs) and how many seeds you enter in vcg_code.h depend on which version of FLEXnet Licensing you have built into your applications.  You must mimic the encryption seed information found in lm_code.h and set unused seed values to 0x0.   
        If you are new to FLEXnet Licensing with v8.1
        +:
        • If you are a new customer starting with FLEXnet Licensing v8.1+ with or without TRL, you do not have to worry about compatibility with any previous versions of FLEXnet Licensing.  Change all four of the ENCRYPTION_SEED values to 0x0 and enter your three LM_SEED values from lm_code.h

        If you are upgrading to FLEXnet Licensing v8.1+:

        • If you are a customer who has upgraded to FLEXnet Licensing v8.1+ with TRL and has released applications that were built with a pre-v8.1 TRL-enabled version of FLEXnet Licensing with which you want to maintain compatibility, change all four of the ENCRYPTION_SEEDs to match your ENCRYPTION_SEEDs in lm_code.h.  Change all three LM_SEEDs to match the LM_SEEDs in lm_code.h.  See LM_SIGN_LEVEL.
        • If you are a customer who has upgraded to FLEXnet Licensing v8.1+ without TRL from FLEXnet Licensing v7.1 to v8.0, inclusive, and has released applications that were built with a previous version of FLEXnet Licensing with which you want to maintain compatibility, change all four of the ENCRYPTION_SEEDs to match your ENCRYPTION_SEEDs in lm_code.h and change all three LM_SEEDs to match the LM_SEEDs in lm_code.h
        • If you are a customer who has upgraded to FLEXnet Licensing v8.1+ without TRL from pre-v7.1 FLEXnet Licensing and has released applications that were built with that previous version of FLEXnet Licensing with which you want to maintain compatibility, enter ENCRYPTION_SEED1 and ENCRYPTION_SEED2 from lm_code.h.  Change the last two ENCRYPTION_SEED values to 0x0.  Change all three LM_SEEDs to match the LM_SEEDs in lm_code.h

        If you are using pre-v8.1 FLEXnet Licensing:

        • If you are a customer using FLEXnet Licensing versions between v7.1 and v8.0, inclusive, without TRL, enter the four ENCRYPTION_SEEDs from lm_code.h.  Change all of the LM_SEED values to 0x0.  
        • If you are a customer using a  pre-v7.1 FLEXnet Licensing version, enter ENCRYPTION_SEED1 and ENCRYPTION_SEED2 from lm_code.h.  Change the last two ENCRYPTION_SEED values and all of the LM_SEED values to 0x0.  

        You do not enter your FLEXnet Licensing vendor keys or TRL keys in vcg_code.h

      • LM_SIGN_LEVEL  The default value is LM_SIGN.  This value should be changed to LM_SIGN2 only if you have upgraded to FLEXnet Licensing v8.1+ with TRL from a previous TRL-enabled version of FLEXnet Licensing and want to maintain compatibility with applications built with pre-v8.1 TRL. This value can be overridden in a PRD by setting the Signature Level item.

      • LM_STRENGTH  This specifies the default encryption strength to use in the license files made by this VCG.  This setting should match what you have set in lm_code.h, but can be overridden in a PRD by setting the Crypt Strength item. Values are as in the FLEXnet Licensing toolkit in machind/lm_cro.h:

        If you are using pre-v7.1 FLEXnet Licensing, use LM_STRENGTH_LICENSE_KEY. 

        LM_STRENGTH_LICENSE_KEY
        LM_STRENGTH_DEFAULT
        LM_STRENGTH_113BIT
        LM_STRENGTH_163BIT
        LM_STRENGTH_239BIT
        LM_STRENGTH_PUBKEY (equivalent to LM_STRENGTH_113BIT)
        LM_STRENGTH_VERYHIGH (equivalent to LM_STRENGTH_239BIT)

         

      • VCG_USE_LICENSE_KEY  Controls whether to use a non-CRO-style 12- or 20-character license key in addition to the SIGN= key.  May be set to TRUE or FALSE. The setting is ignored if LM_STRENGTH is  LM_STRENGTH_LICENSE_KEY or LM_STRENGTH_DEFAULT. This setting can be overridden in a PRD.

      • LM_VER_BEHAVIOR  This specifies the default license file syntax version of license files created by this VCG.  This setting should match the setting in lm_code.h or lm_code2.h, but can be overridden in a PRD.  Values are as in the FLEXnet Licensing toolkit in machind/lmclient.h:

        LM_BEHAVIOR_V2
        LM_BEHAVIOR_V3
        LM_BEHAVIOR_V4
        LM_BEHAVIOR_V5
        LM_BEHAVIOR_V5_1
        LM_BEHAVIOR_V6
        LM_BEHAVIOR_V7
        LM_BEHAVIOR_V7_1
        LM_BEHAVIOR_V8
        LM_BEHAVIOR_V8_1
        LM_BEHAVIOR_V8_2
        LM_BEHAVIOR_V8_3
        LM_BEHAVIOR_V9
        LM_BEHAVIOR_V9_3
        LM_BEHAVIOR_V10_0
        LM_BEHAVIOR_CURRENT

         

      • VCG_LICENSE_CASE_SENSITIVE This setting specifies whether to apply case sensitivity based on the LM_VER_BEHAVIOR setting (-1), to force case sensitivity (1 or TRUE), or to force case insensitivity (0 or FALSE). VCG_LICENSE_CASE_SENSITIVE sets the FLEXnet Licensing LM_A_LICENSE_CASE_SENSITIVE attribute. This setting can not be overridden in a PRD.

        If VCG_LICENSE_CASE_SENSITIVE is set to -1 (default value) and:

        • LM_VER_BEHAVIOR is set to LM_BEHAVIOR_V5_1 or earlier, license text elements will be case sensitive
        • LM_VER_BEHAVIOR is set to LM_BEHAVIOR_V6 or later (or LM_BEHAVIOR_CURRENT), license text elements will be case insensitive

        By default, FLEXnet Licensing performs case folding on license file text. The FLEXnet Licensing case-folding algorithms support the ASCII and ISO 8859-1 codepages, only. If your license file contains characters from codepages other than these (for example, UTF-8), then you must turn off case folding by enabling case sensitivity in your VCG and FLEXnet Licensing implementations.

      Therefore, if you plan to use non-ASCII characters in text elements encoded using UTF-8, set VCG_LICENSE_CASE_SENSITIVE to 1 or TRUE to force case sensitivity.

      By default, the VCG uses ISO-8859-1 encoding for non-ASCII characters in text elements in license certificates. If you want to use some other character encoding (for example, UTF-8) for the VCG (and the rest of the FLEXnet Operations System), set that encoding using the environment variable GT_CHARACTER_ENCODING in GTSITE/config/main.env. For example:

        GT_CHARACTER_ENCODING=UTF-8

      See your FLEXnet Licensing documentation for restrictions on the content of text elements in a license certificate and the types of supported character encoding. To support international characters, changes must also be made in your FLEXnet Licensing toolkit. A summary of the changes follows:

      In the FLEXnet Licensing toolkit:

        If you generate counted licenses, in lsvendor.c, change the following setting to 1:

        int ls_a_license_case_sensitive = 1;

        For consistency between the VCG and lmcrypt, also change the code in lmcrypt.c. Before the call to lc_cryptster(), add a line similar to the following:

        lc_set_attr(lm_job, LM_A_LICENSE_CASE_SENSITIVE, (LM_A_VAL_TYPE) 1);

      In the FLEXenabled Application:

        In the FLEXenabled application (using FLEXible API), add a line similar to the following before the call to lc_checkout():

        lc_set_attr(lm_job, LM_A_LICENSE_CASE_SENSITIVE, (LM_A_VAL_TYPE) 1);

    2. This second step is not needed unless your VCG has special requirements -- support of vendor-defined hostid, multiple sets of encryption seeds, or custom license generators.  If you have any of these requirements, edit vcg_vendor.c and set the following values as necessary:

      • vendor_info[]  This array of VCG_VENDORINFO structures normally has one element per set of encryption seeds.  As configured by default, the array has a single element whose values are taken from the value set in vcg_code.h.  The array can be as many elements as required.  Where there are multiple elements, they are indexed at runtime by the "encryption seed index" specified with the SEED keyword in a PRD.  The definition of the structure is in machind/vcg.h in the VCG kit.

      If you have multiple elements and are upgrading from a pre-v5.0.2 VCG, be sure to add a case sensitivity setting in each of the vendor_info[] elements. See machind/vcg.h for the location of this setting in the structure definition.

      • vendor_generators[]  This array of VCG_GENERATOR structures normally has a single element which references the standard VCG license generator.  If you have custom license generators to integrate with the VCG, add references to them to this array.  The array is indexed at run-time by the "certificate generator index" value specified with the GENERATOR keyword in product definition files.  The definition of the structure is in machind/vcg.h in the VCG kit.  Please contact technical support for details on the custom generator API if you plan to use this feature.

      • vcgvendor_hostid_setup()  This is a pointer to a function that will be called for vendor-defined hostid setup, if any.  It is specified as NULL in the version of vcg_vendor.c which comes with the VCG kit:

             typedef void (*PFV)();
             void (*vcg_vendor_hostid_setup)() = (PFV)0;

      To allow the VCG to generate licenses for your vendor-defined hostid type, replace 0 in the line above (in vcg_vendor.c) with the name of the function used to define the vendor-defined hostids that was written by the person who integrated FLEXnet Licensing into your applications.

      Please contact technical support for details on integrating a vendor-defined hostid type with the VCG.

Building the VCG

You must build a VCG on each platform on which you run an Operations client that will generate licenses, on which you run the Customer Portal, or on which you run the Fulfillment service. On UNIX, use a C compiler that understands the cc command.  You may not be able to successfully build the VCG if you set cc to call the gcc compiler, especially on Solaris.  On Windows, we recommend Microsoft Visual C++ v6.0+.

Note for Red Hat Linux: An Operations client, etc. running on Red Hat versions 6.x to 9 or Enterprise 3.0 can run with a VCG built with the i86_r6 platform files. However, a VCG built with the i86_r6 files must be built on Red Hat 6.x to 8. If you build the VCG on Red Hat 9 (to import into an Operations client running on Red Hat 9), build with the i86_r9 platform files; if you build the VCG on Red Hat Enterprise 3 (to import into an Operations client running on Red Hat Enterprise 3), build with the i86_re3 platform files.

    1. Change the directory to a platform-specific directory (for example, sun4_u5, i86_n3, i86_r6, i86_r9, i86_re3 ).  Edit makefile (on UNIX platforms) or vcg.mak (on Windows).  Make the following changes:

      VENDOR  This is your ISV name and is usually the same value as the vendor daemon name that was entered for VENDOR_NAME in machind/vcg_code.h.

        Example: If your FLEXlm vendor daemon name is "mycorpd," you would change the line:
          VENDOR = demo
          to:
          VENDOR = mycorpd

    2. To build the VCG binary, run:
      UNIX:  make
      Windows:  nmake -f vcg.mak

The name of the VCG executable is ISV_vcg[.exe].  Repeat both of these steps for each platform-specific VCG that you build.  

Importing the VCG into an Operations Client

To generate licenses with Operations clients, the Customer Portal web application, or the Fulfillment service, you must import a VCG into an Operations client running from each of those installations.  See the FLEXnet Operations Online Help for instructions to import the VCG into an Operations client. 

Last updated 2/07/05