Application Environment

Win32™/Win64™ Environment

SafeNet ProtectToolkit-C is supplied as a Win32/64 Dynamic Link Library (cryptoki.dll) built with Microsoft development tools (MSVC). cryptoki2.lib is an import library that should be linked against applications to resolve function calls into cryptoki.dll.

UNIX Environments

This is supplied as shared libraries. The hardware based SafeNet ProtectToolkit-C library is stored as the shared library libcthsm.so (libcthsm.sl for HP-UX on PA-RISC, libcthsm.a for AIX) and the software-only version as libctsw.so (libctsw.sl for HP-UX on PA-RISC, libctsw.a for AIX). The symbolic link libcryptoki.so (libcryptoki.sl for HP-UX on PA-RISC, libcryptoki.a for AIX) is setup in the /opt/safenet/protecttoolkit5/ptk/lib folder and should point to the appropriate library. Additionally these libraries must be included in the LD_LIBRARY_PATH (SHLIB_PATH for HP-UX on PA-RISC, or LIBPATH for AIX).

The libcthsm shared object requires the library libethsm.

For systems that support 32-bit and 64-bit, the 32-bit libraries and executables are the default.

Java™ Environments

A lightweight proprietary Java wrapper for PKCS#11 API, JCPROV, is provided to allow access to the SafeNet ProtectToolkit-C functionality from Java, without the overhead of the JCA/JCE API. The aim of this API is to be as similar to the PKCS#11 as the Java language allows. This provides a high level of familiarity with the PKCS#11 environment and allows for faster implementation of Java programs.

The Java API is compatible with JDK 6, 7, and 8. The library is implemented in jcprov.jar, under the namespace safenet_tech.jcprov. An accompanying shared library “jcprov” (jcprov.dll in Win32/64 environments, and libjcprov.so in UNIX environments (libjcprov.sl for HP-UX on PA-RISC, libjcprov.a for AIX) provides the native methods used to access the appropriate PKCS#11 library.

JCPROV Java JNI Support (AIX Only)

The Java VM on AIX does not support mixed mode JNI libraries. Mixed mode libraries are shared libraries that provide both 32-bit and 64-bit interfaces. It is therefore essential that the correct JNI library is selected for use with Java VM being used.

If using a 32-bit Java VM

>The /opt/safenet/protecttoolkit5/ptk/lib/libjcprov.a symbolic link must point to a 32-bit version of the library (libjcprov_32.a).

For example: /opt/safenet/protecttoolkit5/ptk/lib/libjcprov_32.a

>The /opt/safenet/protecttoolkit5/ptk/lib/libjcryptoki.a symbolic link must point a 32-bit version of the library (libjcryptoki_32.a).

For example: /opt/safenet/protecttoolkit5/ptk/lib/libjcryptoki_32.a

If using a 64-bit Java VM

>The /opt/safenet/protecttoolkit5/ptk/lib/libjcprov.a symbolic link must point to a 64-bit version of the library (libjcprov_64.a).

For example: /opt/safenet/protecttoolkit5/ptk/lib/libjcprov_64.a

>The /opt/safenet/protecttoolkit5/ptk/lib/libjcryptoki.a symbolic link must point a 64-bit version of the library (libjcryptoki_64.a).

For example: /opt/safenet/protecttoolkit5/ptk/lib/libjcryptoki_64.a

NOTE   When installing the SafeNet ProtectToolkit-C Runtime package, the above links are automatically created to use the 32-bit versions of the JNI libraries.