HP Open Source Security for OpenVMS Volume 3: Kerberos > Chapter 5 GSSAPI (Generic Security Services Application Programming Interface)

gss_inquire_cred_by_mech — Obtain per-mechanism information about a credential

  Table of Contents

  Glossary

  Index

C Prototype

OM_uint32 gss_inquire_cred_by_mech(
OM_uint32 * minor_status,
gss_cred_id_t cred_handle,
gss_OID mech_type,
gss_name_t * name,
OM_uint32 * initiator_lifetime,
OM_uint32 * acceptor_lifetime,
gss_cred_usage_t * cred_usage );

Arguments

minor_status (output) 

A handle that refers to the target credential. Specify GSS_C_NO_CREDENTIAL to inquire about the default initiator principal.

mech_type (input) 

The mechanism for which information should be returned.

name (output) 

The name whose identity the credential asserts.

initiator_lifetime (output) 

The number of seconds for which the credential will remain capable of initiating security contexts under the specified mechanism. If the credential can no longer be used to initiate contexts, or if the credential usage for this mechanism is GSS_C_ACCEPT, this argument will be set to zero. If the implementation does not support expiration of initiator credentials, the value GSS_C_INDEFINITE will be returned. Specify NULL if not required.

acceptor_lifetime (output) 

The number of seconds for which the credential will remain capable of accepting security contexts under the specified mechanism. If the credential can no longer be used to accept contexts, or if the credential usage for this mechanism is GSS_C_INITIATE, this argument will be set to zero. If the implementation does not support expiration of acceptor credentials, the value GSS_C_INDEFINITE will be returned. Specify NULL if not required.

cred_usage (output) 

How the credential may be used with the specified mechanism. Specify NULL if not required. Valid values are as follows:

GSS_C_INITIATE

GSS_C_ACCEPT

GSS_C_BOTH

Description

This routine obtains per-mechanism information about a credential.

Return Values

This routine returns one of the following GSS status codes:

GSS_S_COMPLETE

Successful completion.
GSS_S_NO_CRED The referenced credentials could not be accessed.

GSS_S_DEFECTIVE_CREDENTIAL

The referenced credentials were invalid.