Skip navigation.

ATMI C Function Reference

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

 


tpkey_setinfo(3c)

Name

tpkey_setinfo()—Sets optional attribute parameters associated with a key handle.

Synopsis

#include <atmi.h>
int tpkey_setinfo(TPKEY hKey, char *attribute_name, void *value, long value_len, long flags)

Description

tpkey_setinfo() sets an optional attribute parameter for a key handle. A key handle represents a specific principal's key and the information associated with it.

The key for which information is to be modified is identified by the hKey input parameter. The attribute for which information is to be modified is identified by the attribute_name input parameter. Some attributes may be specific to a certain cryptographic service provider, but the core set of attributes presented on the tpkey_getinfo(3c) reference page should be supported by all providers.

The information to be associated with the attribute_name parameter is stored in the memory location indicated by value. If the data content of value is self-describing, value_len is ignored (and may be 0). Otherwise, value_len must contain the length of data in value.

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 or attribute_name refers to a read-only value.

[TPELIMIT]

The value provided is too large.

[TPESYSTEM]

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

[TPENOENT]

The requested attribute is not recognized by the key's cryptographic service provider.

See Also

tpkey_close(3c), tpkey_getinfo(3c), tpkey_open(3c)

 

Skip navigation bar  Back to Top Previous Next