NAME

catpsd_setpsd - install a Virtual Card in a session

SYNOPSIS

#include <cat/cat.h>

int catpsd_setpsd(cat_session *sess, cat_psd *psd, int flags);

DESCRIPTION

This function associates Virtual Card psd with session sess. Psd must have been opened by catpsd_openpsd.

Only one session can be associated with a Virtual Card at any time. Flags can contain combinations of the following values, ORed together bitwise:

CATPSD_DEFEROPEN
The Virtual Card will not be opened until it is needed.

CATPSD_BOKSPSD
The Virtual Card is a Keon 4.5 (BoKS) Agent Host Virtual Card, in which pin, which defines the password, has been hashed. The function tries to open the Virtual Card with a hashed and unhashed PIN, and the Virtual Card will be opened (provided the password is correct), but using this flag determines the order and means that the Virtual Card may be opened more quickly.

CATPSD_CLOSE
The Virtual Card will be automatically freed (using catpsd_closepsd() when session is closed.

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

SEE ALSO

catpsd