Using Custom License Generators

In some situations, you will want to develop your own license generator, to replace the standard RLM license generator. You can do this with Activation Pro.

To do this, take the following steps:

  1. Define your license generation algorithm in the product definition. 0 is the standard RLM algorithm, any positive integer is defined by you. This integer will be passed to your license generator in step 2.

  2. Create a function called “rlm_ext_sign_license() similar to the example at the end of this section, except that you will parse the input LICENSE line and re-write the license in whatever (text) format you want.

  3. Link your rlm_ext_sign_license() function into the license generator, placing your object file before the library so that your generator is used in place of the dummy function in the library. To build your license generator, follow the instructions for building your license generator as if you had an ISV-defined hostid.

  4. Install your license generator (ISV_mklic or ISV_mklic.exe) and you are ready to go.

The example rlm_ext_sign_license() function is here:

/******************************************************************************
COPYRIGHT (c) 2007, 2013 by Reprise Software, Inc.
This software has been provided pursuant to a License Agreement
containing restrictions on its use. This software contains
valuable trade secrets and proprietary information of
Reprise Software Inc and is protected by law. It may not be
copied or distributed in any form or medium, disclosed to third
parties, reverse engineered or used in any manner not provided
for in said License Agreement except with the prior written
authorization from Reprise Software Inc.
*****************************************************************************/
/*
* Function: stat = rlm_ext_sign_license(rh, algorithm,
* server_hosid, license)
*
* Description: Create a license - ISV-defined
*
* Parameters: (RLM_HANDLE) rh
* (int) algorithm - algorithm to use (ISV-defined)
* (char *) server_hostid - Server hostid, if applicable
* (char *) license - input/output license string
*
* Return: (char *) license - input/output license string
* (int) status - status return
*
* M. Christiano
* 7/27/12
*
*
* This function should be replaced by the ISV with an equivalent
* function which creates the license in the string "license".
*
*/
#include "license.h"
int rlm_ext_sign_license(RLM_HANDLE rh, int algorithm, char *server_hostid,
char *license)
{
/*
* If this were the real function, the string "license" would
* be replaced by the actual generated license.
*
* Note that "license" has RLM_MAX_LINE allocated bytes only,
* and is allocated on the stack.
* In practice, however far fewer bytes can be transmitted
* back to the client, since the whole HTTP message can be
* no more than 1024 bytes.
*
* Return 0 for success, a non-zero error code using the status
* in license.h for an error.
*/
(void) strcpy(license, "dummy externally-signed license\n");
return(0);
}