ATMI C Function Reference
|
|
tpsign()—Marks a typed message buffer for digital signature.
#include <atmi.h>
int tpsign(char *data, TPKEYhKey, longflags)
tpsign() marks, or registers, a message buffer for digital signature on behalf of the principal associated with hKey.
data must point to a valid typed message buffer either (1) previously allocated by a process calling tpalloc() or (2) delivered by the system to a receiving process. The content of the buffer may be modified after tpsign() is invoked.
When the buffer pointed to by data is transmitted from a process, the public key software generates and attaches a digital signature to the message buffer for each digital-signature registration request. A digital signature enables a receiving process to verify the signer (originator) of the message.
The flags argument is reserved for future use and must be set to 0.
On failure, this function returns -1 and sets tperrno to indicate the error condition.
Invalid arguments were given. For example, hKey is not a valid key for signing or the value of data is NULL.
|
|
|