APIs: Security Driver

Uniface provides an API for creating custom client/server and SMTP and POP security drivers. The API include files for the C compiler and libraries are provided in the Uniface\3gl directory.

Depending on the API you use, you will need one or more of these files to compile the driver. You can specify all of the libraries to the linker. The following C include files provide the API definitions, as well as some useful utility functions:

  • zsecdrv.h—generic Security Driver API definitions
  • unienc.h—encryption functions for encoding and decoding data using commonly-used encryption algorithms, including Base64, DES (Data Encryption Standard), MD4, MD5, and HMAC (Message Authentication using Keyed Hashing).
  • usecdrvsub.h—utility function definitions for manipulating lists and parsing replies from SMTP and POP servers; not required for client/server security drivers

To help in compiling and linking, Uniface also provides makefile.inc. This file contains the basic compile and link commands and qualifiers used to build Uniface on that platform. Optionally a symbol defining the platform libraries used in linking Uniface is also provided. Please examine these files carefully when considering how to compile and link your own code. For more information, see 3GL Compile and Link Commands.

To use the Security Driver API, include at least the zsecdrv.h file, and specify a single function to server as an entry point for the driver. The entry point takes a structure parameter USecDrv for exchanging information with the caller of the driver.

The driver must perform the action requested of it, as defined by the Function member of the USecDrv structure.

Macros should be used to specify or determine the functionality provided by the driver when using the USEC_DRVINFO function.

Related Topics