2 .\" Copyright (C) 2004 Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GSS_INQUIRE_CRED 3GSS "Jan 30, 2004"
8 gss_inquire_cred \- obtain information about a credential
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lgss\fR [ \fIlibrary\fR... ]
13 #include <gssapi/gssapi.h>
15 \fBOM_uint32\fR \fBgss_inquire_cred\fR(\fBOM_uint32 *\fR\fIminor_status\fR,
16 \fBconst gss_cred_id_t\fR \fIcred_handle\fR,\fBgss_name_t *\fR\fIname\fR,
17 \fBOM_uint32 *\fR\fIlifetime\fR, \fBgss_cred_usage_t *\fR\fIcred_usage\fR,
18 \fBgss_OID_set *\fR\fImechanisms\fR);
24 The parameter descriptions for \fBgss_inquire_cred()\fR follow:
28 \fB\fIminor_status\fR\fR
31 Mechanism specific status code.
37 \fB\fIcred_handle\fR\fR
40 Handle that refers to the target credential. Specify \fBGSS_C_NO_CREDENTIAL\fR
41 to inquire about the default initiator principal.
50 Name of the identity asserted by the credential. Any storage associated with
51 this name should be freed by the application after use by a call to
52 \fBgss_release_name\fR(3GSS).
61 Number of seconds for which the credential remains valid. If the credential has
62 expired, this parameter will be set to zero. Specify \fBNULL\fR if the
63 parameter is not required.
69 \fB\fIcred_usage\fR\fR
72 Flag that indicates how a credential is used. The \fIcred_usage\fR parameter
73 may contain one of the following values: \fBGSS_C_INITIATE\fR,
74 \fBGSS_C_ACCEPT\fR, or \fBGSS_C_BOTH\fR. Specify \fBNULL\fR if this parameter
81 \fB\fImechanisms\fR\fR
84 Set of mechanisms supported by the credential. Storage for the returned
85 \fBOID\fR-set must be freed by the application after use by a call to
86 \fBgss_release_oid_set\fR(3GSS). Specify \fBNULL\fR if this parameter is not
93 Use the \fBgss_inquire_cred()\fR function to obtain information about a
98 The \fBgss_inquire_cred()\fR function can return the following status codes:
102 \fB\fBGSS_S_COMPLETE\fR\fR
105 Successful completion.
111 \fB\fBGSS_S_NO_CRED\fR\fR
114 The referenced credentials could not be accessed.
120 \fB\fBGSS_S_DEFECTIVE_CREDENTIAL\fR\fR
123 The referenced credentials were invalid.
129 \fB\fBGSS_S_CREDENTIALS_EXPIRED\fR\fR
132 The referenced credentials have expired. If the \fIlifetime\fR parameter was
133 not passed as \fBNULL\fR, it will be set to \fB0\fR.
139 \fB\fBGSS_S_FAILURE\fR\fR
142 The underlying mechanism detected an error for which no specific \fBGSS\fR
143 status code is defined. The mechanism-specific status code reported by means of
144 the \fIminor_status\fR parameter details the error condition.
150 See \fBattributes\fR(5) for descriptions of the following attributes:
158 ATTRIBUTE TYPE ATTRIBUTE VALUE
166 \fBgss_release_name\fR(3GSS), \fBgss_release_oid_set\fR(3GSS),
167 \fBlibgss\fR(3LIB), \fBattributes\fR(5)
170 \fISolaris Security for Developers Guide\fR