Modern Guardant dongles starting from Guardant Sign allow protecting applications launched under GNU/Linux OS on i386 and x86_64 hardware platforms. For this purpose static libraries (ELF) libgrdapi.a of respective bit version, implementing the Guardant API have been included into the Developer’s kit.

Besides, the launch of protected Windows applications is supported with the use of Wine (www.winehq.org). For this GrdWine – project of dynamic library for Wine was included into the Developer’s kit. It is distributed under free GNU Lesser General Public License version 2.1 (supplied as a package with source code grdwine-0.5.x.tar.gz).

The dongles are operating in GNU/Linux OS (including in HID-mode) without installing additional drivers and daemons, requiring just the name and the permission to access the device driver.

 

Linux USB Device Filesystem or Linux USB HID Device Interface (in case with HID mode) are used to address the dongle. The Developer’s kit includes a set of rules for the device registration systems and the description of requirements for the cases of customized configuration.

 

You need to link the protected application with a static Guardant API library in order to assemble the protected application. 

It is recommended to use GCC compiler ver. 4, however, you may use earlier versions of GCC and other compilers, for instance, Intel C++ Compiler (ICC).

You need to perform the following with Guardant API library for compilation (based on the example with source code of the program — foobar.c):

$ gcc [-I<path_to_the_GrdAPI.h>] -c foobar.c -o foobar.o 
$ gcc [-L<path_to_the_libgrdapi.a>] foobar.o -o foobar -lpthread -lgrdapi 

or 

$ gcc [-I<path_to_the_GrdAPI.h>] [-L<path_to_the_libgrdapi.a>] foobar.c -o foobar -lgrdapi -lpthread

Pay attention to the fact that Guardant API library uses pthread - POSIX .Threads library, therefore you need to use the respective library for assembling the applications.

Connect the Guardant dongle to the USB port of your computer and the protected application is ready to run.

grdwine.dll.so library implementing the work with Guardant dongles with protected Windows applications under Wine is supplied in a form of source codes (see grdwine-0.5.x.tar.gz). This allows using it with any version of Wine – all you need is to assemble the library from source codes.

Important information

Wine version recommended for use – 1.x.x. Correct operation with earlier versions of Wine is not guaranteed. You can download the last version of Wine here: http://www.winehq.org/site/download

Library compilation

$ tar xvf grdwine-0.5.4.tar.gz 
$ cd grdwine-0.5.4 
$ ./configure --with-wineincs=/usr/include/wine 
--with-winedlls=/usr/lib/wine 
$ make 
# make install

Important information

The paths to header files and Wine libraries indicated in the samples (/usr/include/wine and /usr/lib/wine) can be changed depending on the Wine version, distributor in use and set prefix for installation (in case if Wine was installed from source codes)

Connect the Guardant dongle to the USB port of your computer and the protected application is ready to run.

Removing Library

$ cd grdwine-0.5.4 
# make uninstall 

For dongles operating in the driver mode

The dongle is addressed through Linux USB Device Filesystem.

For successful operation with the dongle in the system you need to provide access for reading/writing to the device’s file. 

See details in linux/Documentation/usb/proc_usb_info.txt.

For successful operation with the dongle in the system you need to provide access for reading/writing to the device’s file.

For dongles operating in HID mode

Dongle is addressed through Linux USB HID Device Interface (usbhid driver). See details in linux/ Documentation/usb/hiddev.txt.

You need to change the names of the corresponding devices for /dev/grdhid[No.] and allow the read/write access to the device file to ensure successful operation with the dongle. 

hotplug or hotplug-ng example 

# cp etc/grdnt.usermap /etc/hotplug/usb/grdnt.usermap 
# cp etc/grdnt /etc/hotplug/usb/grdnt

udev example 

For dongles operating in the driver mode and file devices in USB Device Filesystem 

# cp etc/grdnt.udev /etc/udev/rules.d/95-grdnt.rules

For dongles operating in HID mode

 # cp etc/grdnt_hid.udev /etc/udev/rules.d/95-grdnt_hid.rules
  • No labels