u2f-host-version

u2f-host-version

Functions

const char * u2fh_check_version ()

Types and Values

Description

Functions

u2fh_check_version ()

const char *
u2fh_check_version (const char *req_version);

Check that the version of the library is at minimum the requested one and return the version string; return NULL if the condition is not satisfied. If a NULL is passed to this function, no check is done, but the version string is simply returned.

See U2FH_VERSION_STRING for a suitable req_version string.

Parameters

req_version

Required version number, or NULL.

 

Returns

Version string of run-time library, or NULL if the run-time library does not meet the required version number.

Types and Values

U2FH_VERSION_STRING

#define U2FH_VERSION_STRING "1.1.9"

Pre-processor symbol with a string that describe the header file version number. Used together with u2fh_check_version() to verify header file and run-time library consistency.


U2FH_VERSION_NUMBER

#define U2FH_VERSION_NUMBER 0x010109

Pre-processor symbol with a hexadecimal value describing the header file version number. For example, when the header version is 1.2.3 this symbol will have the value 0x01020300. The last two digits are only used between public releases, and will otherwise be 00.


U2FH_VERSION_MAJOR

#define U2FH_VERSION_MAJOR 1

Pre-processor symbol with a decimal value that describe the major level of the header file version number. For example, when the header version is 1.2.3 this symbol will be 1.


U2FH_VERSION_MINOR

#define U2FH_VERSION_MINOR 1

Pre-processor symbol with a decimal value that describe the minor level of the header file version number. For example, when the header version is 1.2.3 this symbol will be 2.


U2FH_VERSION_PATCH

#define U2FH_VERSION_PATCH 9

Pre-processor symbol with a decimal value that describe the patch level of the header file version number. For example, when the header version is 1.2.3 this symbol will be 3.