HSM Functions Reference

A number of libraries are required to use the functionality provided by the SafeNet FM SDK. This chapter describes the function sets provided by these libraries.

As well as the functions described in this section, the full set of PKCS#11 functions are also available to the FM. The PKCS#11 functions are described in the Cprov Programmer Manual, and the PKCS#11 standard. The library libfmcprov.a provides the PKCS#11 functions.

>HIFACE Reply Management Functions

>Functionality module dispatch switcher function

>Serial Communication Functions

>High Resolution Timer Functions

>Cprov function patching helper function

>Current Application ID functions

>PKCS#11 State Management Functions

>FM Header Definition Macro

Summary

Subset of ISO C99 standard library

The FM SDK supports a subset of the ISO C 99 standard library, as defined by ISO/IEC 9899:1999. In general, floating point math, multibyte character, localization and I/O APIs are not supported; printf and vprintf are exceptions and are redirected to the logging channel.

In addition to the standard library, C99 language features not present in ANSI C (C89/90) can be used.

The following functions are provided by libfmcrt.a:

assert.h

assert

ctype.h

isalnum, isalpha, isblank, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, tolower, toupper

stdio.h

printf, sprintf, sscanf, vprintf, vsprintf, snprintf, vsnprintf, vsscanf

stdarg.h

va_arg(), va_start(), va_end(), va_copy()

stdlib.h

abs, atoi, atol, atoll, bsearch, calloc, div, free, labs, llabs, ldiv, lldiv, malloc, qsort, rand, realloc, srand, strtol, strtoll, strtoul, strtoull

string.h

memchr, memcmp, memcpy, memmove, memset, strcat, strchr, strcmp, strcpy, strcspn, strlen, strncat, strncmp, strncpy, strpbrk, strrchr, strspn, strstr, strerror, strtok

time.h

asctime, clock, ctime, gmtime, mktime, strftime, time, difftime

Extensions to the Standard C API

The FMS SDK also supports the following common, but non-ISO library functions in their GNU form.

NOTE   These may not be available in emulation mode. See Supported C APIs.

ctype.h

isascii, toascii

string.h

strdup, strsep

Unsupported Standard C APIs

The following standard headers and their contained APIs are not supported by the FM SDK:

complex.h, fenv.h, float.h, locale.h, math.h, signal.h, tgmath.h, wchar.h, and wctype.h