RLM-EZ Reference
RLM-EZ Reference
RLM-EZ v11.1
July, 2015
Contents
Welcome .......................................................................................... 3
Get Started Now – RLM-EZ Quick-Start Guide ........................ 4
Quick-Start on Windows ............................................................... 5
Quick-Start on Linux or Mac........................................................ 7
Integrating RLM-EZ Into Your Product .................................... 8
Using RLM-EZ with .NET ................................................. 10
Using RLM-EZ with Java ................................................... 11
Making Your Product Production-Ready .................................. 13
Creating Licenses .......................................................................... 15
RLM-EZ API ................................................................................. 16
Detached Demo, Open Usage, Reprise License Manager, RLM, RLM-EZ, RLM-Embedded and Transparent License
Policy are all trademarks of Reprise Software, Inc.
RLM-EZ contains software developed by the OpenSSL Project for use in the OpenSSL Toolkit
(http://www.openssl.org)
Introduction To RLM-EZ
RLM-EZ allows you, the software publisher, to flexibly price and license your product(s) for
delivery to your customers. RLM-EZ allows you to deliver fixed (node-locked) licenses to your
customers, with version control and expiration dates. If you need more functionality, Reprise also
offers RLM (a full-function network license manager), and RLM-Embedded (a node-locking
license manager with a richer set of capabilities).
To download RLM-EZ, go to the Reprise Website Download area, enter your username and
password, and select the kit(s) you want to download. Save this on your system.
Note: When downloading Unix or Mac kits using Internet Explorer on Windows XP systems, the
files are incorrectly named as 'platform.tar.tar', rather than 'platform.tar.gz', once downloaded.
This is a browser issue - after transfer, please rename the file before installation.
Each kit has a descriptive name on the website. The file names of the kits follow Reprise
Software's platform naming conventions with ".tar.gz" on Unix and Mac platforms. On windows,
the kits are self-installing .exe files. Some examples are listed here.
Platform
Platform Kit file name
Name
Linux on Intel X86 x86_l2 x86_l2.tar.gz
Linux on Intel (64-bit) x64_l1 x64_l1.tar.gz
Mac on Intel X86 (32-bit) x86_m1 x86_m1.tar.gz
Mac on Intel (64-bit) x64_m1 x64_m1.tar.gz
Mac on PPC ppc_m1 ppc_m1.tar.gz
RLM-EZ.v11.1BL2-
Windows on Intel X86 (visual C v6, 2003) x86_w1
x86_w1.exe
RLM-EZ.v11.1BL2-
Windows on Intel X86 (visual C 2005, 2008) x86_w2
x86_w2.exe
RLM-EZ.v11.1BL2-
Windows on Intel X86 (visual C 2010, 2012) x86_w3
x86_w3.exe
RLM-EZ.v11.1BL2-
Windows 64-bit on intel (Visual C 2005, 2008) x64_w2
x64_w2.exe
RLM-EZ.v11.1BL2-
Windows 64-bit on intel (Visual C 2010, 2012) x64_w3
x64_w3.exe
You should note that you need the Microsoft Visual C development tools in order to configure the
RLM kit. This is necessary to build your public/private key pair. The 32-bit version of the Visual
Studio kit is available for free here: http://www.visualstudio.com/en-US/products/visual-studio-
express-vs
To launch a Command Window with the development environment already set up, use
one of the options in the:
menu. The options differ with the specific version and edition of Visual Studio, but
choose the one that does native development for the platform you're on. In other words, if
you're on a 32-bit system, choose the option that does 32-bit development, and if you're
on a 64-bit system, choose the options that does 64-bit development. This correct choice
may not always be clear from the names of the options, but the command window that's
launched will display a message at the top saying:
"Setting environment for using Microsoft Visual Studio 200x x86 tools."
or
"Setting environment for using Microsoft Visual Studio 200x x64 tools."
If you are using older Visual C compilers and your system doesn't have the Visual Studio
environment set for command line use, you need to run a batch file provided by
Microsoft to set up your command window for the next step. For 32-bit builds, the batch
file to run is "vcvars32.bat"; for 64-bit builds it is "vcvarsamd64.bat". The location of
these batch files is under "Program Files\Microsoft Visual Studio". When you have set
this up, open a command window.
3. Create a license
% ezlicense example.lic any
This command creates the license file “example.lic” for hostid “any”, meaning that it will
work anywhere. No expiration date is specified.
The license you just checked out looks like this (this license is in the file example.lic):
Congratulations! You have now created a license and checked out that license in the example
program. There's not much more to it than that. Now, you are ready to integrate the RLM-EZ calls
into your application and try it out. You can browse the example code in ezclient.c on the kit (the
example application is also located in Appendix A – RLM-EZ Example Client Program, on page
17.)
3. Create a license
% ezlicense example.lic any
The license you just checked out looks like this (this license is in the file example.lic):
Congratulations! You have now created a license and checked out that license in the example
program. There's not much more to it than that. Now, you are ready to integrate the RLM-EZ calls
into your application and try it out. You can browse the example code in ezclient.c on the kit (the
example application is also located in Appendix A – RLM-EZ Example Client Program, on page
17).
a license file to describe your customer’s rights to the product (custom-generated by you
for each of your customers)
the rlm-ez utility rlmhostid – this utility prints the host ID of any supported computer.
Except for the license file, the components are the same for every one of your customers. The
actual license file, which describes your customer’s rights to the product, will (in almost all cases)
be different for every one of your customers.
Given that background, now we are ready to start.
Using the example ezclient.c as a guide, add the RLM api calls to your application. You will
need an rlmez_checkout() call at a bare minimum.
You're done! Now that your application has been built with the RLM-EZ calls included, use the
ezlicense utility to create the license file, and experiment with some different licenses. Don't
forget to read the note on your public-private key pair below.
You can safely ignore the remainder of this note for now, but you should return to this and
understand the implications before you begin your RLM-EZ production implementation.
To create your key pair, run the rlmgenkeys utility. rlmgenkeys creates a pair of files:
rlmpubkey.c - your public key - this gets built into your application
rlmprivkey.c - your private key - this gets built into ezlicense to create your license
keys
To run rlmgenkeys:
% cd kit-dir
% ./rlmgenkeys
Where:
You should run rlmgenkeys once and copy the resulting files to all the other kit directories
you use. Once you have created your key pair and installed it in the kit directories in all your
RLM-EZ kits, do a "make" in each kit to update the rlmez.a library.
You should be very careful with these two files. DO NOT LOSE THEM. Do not allow
your private key file (or ezlicense) outside your company. If your private key file (or
ezlicense) becomes compromised, others will be able to make licenses for your products.
Once you generate these files, you should copy them to a safe place where they will not be
lost, and where they will be secure.
When you upgrade to a newer version of RLM-EZ, you will be asked for the location of
these two files, so that the new version will generate compatible keys with your older
versions.
If you have VS2005 or later, simply double click on dotnet\Reprise\Reprise.sln to open the project
in Visual Studio, then build the project. You can build Debug or Release or both. If you have a
prior version of Visual Studio, then create a project for the RLM .NET code manually, copy
dotnet\Reprise\Reprise\RLMInterop.cs into it, and build.
The example program expects the example license file from the SDK (example.lic) to be correctly
signed and to be available. The example program will check out v1.0 of the license "test1". Here
are the steps to run the example program::
Open dotnet\RLMTest\RLMTest.sln in Visual Studio 2005 or later. If you have an earlier
version of Visual Studio, create a new project for RLMTest, as described above for
Reprise.
Build the project, either Release or Debug or both, but in the same configuration(s) as
you built the Reprise project.
Copy rlmVVVV.dll, which contains the actual RLM code, from your platform folder
(x86_w2 or x64_w2) to some folder which is on your PATH, so that it can be found at
runtime by the application. (Note: VVVV signifies the RLM version, such as 943 for
9.4BL3 or 1002 for 10.0BL2)
Copy example.lic, which is the signed license file, from your platform folder (x86_w2 or
x64_w2) to the same folder containing the application.
Run the application. It opens a command window for it's output, which will look like this
if it runs successfully:
rlm_init successful
hostid of this machine is <your machine's hostid>
test1
version 1.0
expiration permanent
test2
version 1.0
expiration permanent
test3
version 1.0
expiration permanent
rlm_license_center
version 7.0
expiration permanent
rlm_act_admin
version 7.0
expiration permanent
rlm_act_view
using Reprise;
statement with any classes that invoke RLM-EZ, and precede RLM-EZ function names and
constants with "RLM.", for example, "RLM.rlmez_checkout". See the example program
RLMTest.cs for an example.
You will need to include a reference to RLM in your application's project. The object to reference
is: <platform>\Reprise\Reprise\bin\<Debug or Release>\Reprise.dll
RLM-EZ Java is number of Java classes presenting an object interface to underlying native code.
The actual work in RLM-EZ Java is done by platform-dependent code accessed via the Java
Native Interface (JNI). As such, RLM-EZ Java requires that a non-Java RLM-EZ kit be installed
and configured before RLM-EZ Java can be used. The functionality available to a Java program is
the same as that available to a C program. The RLM-EZ Java API is completely documented in
Javadoc. Open doc/index.html with a browser to access that documentation.
If you would like to see the Java interface in action, follow these steps, after installing RLM-EZ:
In the main RLM-EZ kit directory, run "make shared". This builds the shared object
necessary for supporting RLM-EZ Java. The name of the shared object is
rlmez<ver>.<shared>, where:
<ver> is the major and minor version numbers and the build level.
<shared> is the file type of a shared library. This is "so" on linux and “jnilib” on Mac.
For example, in RLM-EZ version 11.0BL2 on a Linux system the name would be
"rlmez1102.so"; on Mac it would be "rlmez1102.jnilib".
Set the environment variable that lets the Java VM find the native library:
% make runclient
This program, whose source code is in the java_unix directory, checks out a
license and keeps it checked out until you hit enter.
On Windows systems:
Go into the java directory and configure the makefile if necessary. The makefile as
shipped refers to the x86_w2 sibling directory. If you are running on a different Windows
platform, edit the makefile and change the definition of "NATIVE_PLATFORM" to
match the platform you're on. For example, if using 32-bit VC2010, change it to read:
NATIVE_PLATFORM = x86_w3
This program, whose source code is in the java directory, checks out a license
and keeps it checked out until you hit enter.
RLM-EZ allows you to request and release licenses for products. The license for a product has
certain attributes, which are described in the license grant itself (which is contained in the license
file). The most basic license attributes are:
Product name (you pick this when you purchase RLM-EZ)
Highest Version supported
The node identification, since all licenses are node-locked.
Expiration date
Before you purchase RLM-EZ, you must decide which products you wish to license and select the
product names for the licenses, since the product name is included in your RLM-EZ license keys
from Reprise Software. It is generally recommended that you choose names that correspond very
closely to the name which your customer purchases - it makes license administration much more
straightforward for your customers if the name of the product in the license is the same as what
they purchased. Note that the product name must be less than 40 characters.
In addition, each license request will specify a version. The two main strategies for selecting
versions are either (a) make the version number match the major version of your software, in
which case a new license would be required by your customers for each major release of your
product or (b) only change the version in the license request occasionally, when you want to force
your customers to purchase a new license.
So, before you start to integrate the code into your application, you should decide:
Where do you want to request the license
What is the name of the license
What license version to request
Generally, the first two decisions will stay the same over the life of the software product, while
you will update the license checkout version from time to time.
There are 2 configuration items you must complete before you build your RLM-EZ kit:
To install your RLM-EZ license, edit the file src/license_to_run.h, using the parameters you
received in the email from Reprise Software.
Your applications are built from components supplied by Reprise Software. You need to provide
only one custom input for the build - your Public Key Pair, for license key verification –
rlm_pubkey.c and rlm_privkey.c.
rlm_pubkey.c and rlm_privkey.c are created by the rlmgenkeys utility. You should run this only
once to create your public/private key pair. Once you create these files, save them - if you lose one
of these files, you will no longer be able to generate license keys compatible with older versions of
your software.
Once you have created these 2 files you update your RLM-EZ library by typing "make" in the kit
directory, and you are ready to link your applications with the RLM-EZ libraries.
With RLM-EZ, you specify nearly all licensing options in the actual license that you ship to your
customers. However, there are a few issues that you need to consider before you ship your
application:
Review the RLM-EZ API calls you make in your application to be sure that you use
product names that are suitable (we strongly recommend using the name of the product that is
in general use), and that the version numbers are correct. If you intend for your customers to
be able to use old licenses from your product, be sure that the version number in the
rlmez_checkout() call is appropriate.
If we have provided you with special debug libraries, make sure you use the non-debug
libraries from the standard kit for your release.
Review the Best Practices for RLM-EZ Integration section and ensure that your product
and installation are well-behaved.
When you ship your product to your customers, it will require a license to run. Generally, you
want to grant different license rights to each customer. In order to do that, you create a unique
license file for each customer.
The license file consists of lines of readable text which describe the actual license grants to your
customers – the product name, version, expiration date, and licensed machine (hostid).
You create and ship licenses using the standard ezlicense utility.
Using ezlicense:
ezlicense creates a (or appends to an existing) license file named “filename” which will operate on
the machine with hostid hostid. Optionally, you can specify a required version and a license
expiration-date. For a list of RLM hostids, see Appendix C – RLM-EZ Hostids on page 20.
Example:
ezlicense a.lic 12345678 -e 1-jan-2017
This command would produce a license file similar to the following:
Note: the expiration date is of the form: dd-mmm-yyyy. Months are jan, feb, mar, apr, may, jun, jul, aug,
sep, oct, nov, dec.
/******************************************************************************
*****************************************************************************/
/*
* Description: Test client for RLM-EZ
*
* Parameters: None
*
* Return: None
*
* M. Christiano
* 11/27/05
*
*/
#include "rlmez.h"
#include <stdio.h>
int
main(int argc, char *argv[])
{
int stat, days;
char *ver = "1.0";
char resp[100];
char errstring[RLM_ERRSTRING_MAX];
File Contents
rlmez.h rlm include file
ez.c License for RLM-EZ itself
ezclient.c RLM-EZ example client program.
rlmez.lib (rlmez.a on unix) The RLM-EZ client library
RELEASE_NOTES Release notes for this version of RLM-EZ
rlmgenkeys.exe Utility program to generate public-Key pair
rlmhostid.exe Prints the hostid on any system
rlmid1.lib Windows only: rlmid1 support library
makefile Makefile
ezlicense.obj (.o on unix) main() function for ezlicense license generator
RLM-EZ.pdf This manual
VERSION RLM-EZ kit version information
Windows only: Visual Studio/Visual C++
x*_w2.vcproj, x86_w1.dsw
project for configuring the kit
Java, dotnet support:
Windows only: Visual Studio 2005 Project
Reprise
Directory for RLM .net support
Windows Only: Visual Studio 2005 Project
RLMTest
Directory for RLM .net Test program
java/doc Directory of Java HTML documentation
java/makefile Java Makefile
java/rlmVVRB.jar Java Library (VV=ver, R=rev, B=build)
java/RlmClient.java Example rlm application program
java/rlmjava.def JNI DLL exports (Windows only)
java/INSTALL Java kit installation script (Unix only)
java/VERSION RLM kit version information
To determine the hostid of a machine, use the hostid type from the table above as input to the
rlmhostid command:
For example:
rlmhostid long
or
rlmhostid internet
Note: IP address hostids can contain the wildcard ('*') character in any position to indicate that any
value is accepted in that position.
1. The RLM-EZ folder contains Microsoft Visual Studio or Visual C++ project and
workspace files. Double-click on the appropriate file to launch Visual Studio/Visual C++.
In x86_w1, double-click on x86_w1.dsp. In x86_w2, double-click on x86_w2.vcproj. In
x64_w2, double-click on x64_w2.vcproj.
2. When the development environment comes up, click on the Build menu and select
"Rebuild All" (Visual C++) or "Build Solution" (Visual Studio). When the build is done,
the output window should indicate 0 errors and warnings.
The Visual C++ project is based on Visual C++ v6, and the Visual Studio project on
Visual Studio 2005. If you’re using a later version of the development environment, it
will prompt you to allow it to convert the project to the later version. Allow it to do so,
then proceed.
Under C/C++, add <RLM-EZ SDK path>\src to the Additional Include Directories
(where <RLM-EZ SDK Path> is the path to the installed RLM-EZ SDK)
Under the Link Command Line or Project Options section, make sure the following
libraries are included:
• ws2_32.lib
• Advapi32.lib
• Gdi32.lib
• User32.lib
• winhttp.lib
• netapi32.lib
• kernel32.lib
• oldnames.lib
• shell32.lib
• libcmt.lib
RLM-EZ Reference Manual Page 21 of 22
Then you will be able to use RLM-EZ in your project without leaving the GUI.
The libraries in the x86_w2 and x64_w2 builds are created with VC2005.
However, VC2008-compatible _md and _mdd variants are supplied. If you are using
VC2008 and will be building executables that link dynamically to the C run time library
(that is, you compile with /md or /mdd), you should put the VC2008-compatible libraries
in place before you configure the SDK. Perform the following steps in the x86_w2 and/or
x64_w2 folders:
1. Copy rlmclient_md.lib and rlmclient_mdd.lib to different names, in case you
ever need them later for VC2005 builds.
2. Rename rlmclient_md90.lib to rlmclient_md.lib
3. Rename rlmclient_mdd90.lib to rlmclient_mdd.lib