pkc_plcy_get_key_trust(3sec)Returns information about trust in a key Synopsis #include <pkc_plcy.h> unsigned32 pkc_plcy_get_key_trust( gss_OID policy, void * keys_handle, unsigned key_index, certification_flags_t * flags, uuid_t * key_domain, unsigned long * key_usages); Parameters Input
policy
keys_handle
key_index Output
flags
key_domain
key_usages Description pkc_plcy_get_key_trust(3sec) searches the list of registered policies for implementations of the specified policy. If found, the implementation is opened, if necessary, and its (*get_key_data)( ) function is invoked. Necessary mutex protection around non-thread safe policy implementations is provided. The returned certification_flags_t structure describes the trust that can be placed in the key. It contains the following fields:
· trust_type
- UNTRUSTED
- DIRECT_TRUST
- CERTIFIED_TRUST If key_domain and key_usages are passed as non-NULL pointers, upon successful return these parameters will describe the domain and permitted usage(s) of the specified key. Policies that do not distinguish keys according to domain will indicate a domain of sec_pk_domain_unspecified; policies that do not distinguish keys according to usage will indicate all usages are permitted. The returned key_usages is a bit mask which describes the usage(s), if any, which the key is restricted to. The value is formed by AND-ing together one or more of the following constants:
PKC_KEY_USAGE_AUTHENTICATION
PKC_KEY_USAGE_INTEGRITY
PKC_KEY_USAGE_KEY_ENCIPHERMENT
PKC_KEY_USAGE_DATA_ENCIPHERMENT
PKC_KEY_USAGE_KEY_AGREEMENT
PKC_KEY_USAGE_NONREPUDIATION
PKC_CAKEY_USAGE_KEY_CERT_SIGN
PKC_CAKEY_USAGE_OFFLINE_CRL_SIGN
PKC_CAKEY_USAGE_TRANSACTION_SIGN A returned key_usages value of NULL (or a value with all bits set) means that the key is suitable for any usage. Return Values
pkc_s_success Errors Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages. Related Information
Functions:
|