Skip navigation.

ATMI C Function Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


tpsign(3c)

Name

tpsign()—Marks a typed message buffer for digital signature.

Synopsis

#include <atmi.h>
int tpsign(char *data, TPKEY hKey, long flags)

Description

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.

Return Values

On failure, this function returns -1 and sets tperrno to indicate the error condition.

Errors

[TPEINVAL]

Invalid arguments were given. For example, hKey is not a valid key for signing or the value of data is NULL.

[TPESYSTEM]

An error occurred. Consult the system error log file for details.

See Also

tpkey_close(3c), tpkey_open(3c)

 

Skip navigation bar  Back to Top Previous Next