NAME

catcert_setdb - install certificate cache

SYNOPSIS

#include <cat/cat.h>

int catcert_setdb(cat_session *sess, catdb_func *func, void *handle);

DESCRIPTION

This function registers a database handler function used to manage any caches that the certificate checking functions may need. See catssl_setdb() for details on the database handler interface.

The func function is used to add, delete and look up certificates in the cache.

handle is the certificate cache handle.

The callback function, func, must match the following prototype;

  typedef int catdb_func(int, catdb_data *, void *);

where the first argument is one of CATDB_GET, CATDB_PUT, CATDB_DEL or CATDB_CHECK.

NOTES

The SDK contains two implementations suitable as caches. The memdb and the filedb (only on UNIX) interfaces.

RETURN VALUES

The function returns 0 if successful, or a negative code on error.

SEE ALSO

cat, catcert

catssl_setdb, cat_newmemdb, cat_newfiledb