ATMI C Function Reference
|
|
tpkey_setinfo()—Sets optional attribute parameters associated with a key handle.
#include <atmi.h>
int tpkey_setinfo(TPKEYhKey, char *attribute_name, void *value, longvalue_len, longflags)
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.
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 or attribute_name refers to a read-only value.
|
|
|