HSM Functions Reference
The Luna FM SDK package has a number of libraries that are required to use the functionality provided to the FM. This section provides information on these functions and the libraries that provide the function set.
Apart from 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.
The HSM Functions section contains reference material for the following functions:
>HIFACE Reply Management Functions
>Functionality Module Dispatch Switcher Functions
>Extensions to the Standard C Library
>Serial Communication Functions
>High Resolution Timer Functions
>Current Application ID functions
> PKCS#11 State Management Functions
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 |
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,, realloc, strtol, strtoll, strtoull, stroul |
string.h |
memchr, memcmp, memcpy, memmove, memset, strcat, strchr, strcmp, strcpy, strcspn, strlen, strncat, strncmp, strncpy, strrchr, strspn, strstr, strerror, strtok |
time.h |
asctime, clock, ctime, gmtime, localtime, mktime, strftime, time, difftime, clock, gettime |
Unsupported Standard C APIs
The following standard headers and their contained APIs are not supported by the FM SDK:
>comple.h
>fenv.h
>float.h
>locale.h
>math.h
>signal.h
>tgmath.h
>wchar.h
>wctype.h
Request/Reply Message management functions
The following functions are provided by libfmsupt.a:
High Precision Timers
Register Functionality module Custom handler function
The following functions are provided by libfmsupt.a :
Serial communication functions
The following functions are provided by libfmsupt.a :
USB Access functions
NOTE There is no direct USB support at this time.