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

gss_inquire_cred — Provide calling application with information about a credential

 » Table of Contents

 » Glossary

 » Index

C Prototype

OM_uint32 gss_inquire_cred(
OM_uint32 * minor_status,
gss_cred_id_t cred_handle,
gss_name_t * name,
OM_uint32 * lifetime,
gss_cred_usage_t * cred_usage,
gss_OID_set * mechanisms );

Arguments

minor_status (output) 

An implementation-specific status code.

cred_handle (input) 

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

name (output) 

The name whose identity the credential asserts. Storage associated with this name should be freed by the application after use with a call to gss_release_name. Specify NULL if not required.

lifetime (output) 

The number of seconds for which the credential will remain valid. If the credential has expired, this argument will be set to zero. If the implementation does not support credential expiration, the value GSS_C_INDEFINITE will be returned. Specify NULL if not required.

cred_usage (output) 

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

GSS_C_INITIATE

GSS_C_ACCEPT

GSS_C_BOTH

mechanisms (output) 

The set of mechanisms supported by the credential. Storage associated with this OID set must be freed by the application after use with a call to gss_release_oid_set. Specify NULL if not required.

Description

This routine obtains information about a credential. The caller must already have obtained a handle that refers to the 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.

GSS_S_CREDENTIALS_EXPIRED

The referenced credentials have expired. If the lifetime argument was not passed as NULL, it will be set to zero.