1 /* cred.c Implementation of GSS-API Credential Management functions.
2 * Copyright (C) 2003 Simon Josefsson
4 * This file is part of Shishi.
6 * Shishi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * Shishi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with Shishi; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 gss_acquire_cred (OM_uint32
* minor_status
,
26 const gss_name_t desired_name
,
28 const gss_OID_set desired_mechs
,
29 gss_cred_usage_t cred_usage
,
30 gss_cred_id_t
* output_cred_handle
,
31 gss_OID_set
* actual_mechs
, OM_uint32
* time_rec
)
37 gss_add_cred (OM_uint32
* minor_status
,
38 const gss_cred_id_t input_cred_handle
,
39 const gss_name_t desired_name
,
40 const gss_OID desired_mech
,
41 gss_cred_usage_t cred_usage
,
42 OM_uint32 initiator_time_req
,
43 OM_uint32 acceptor_time_req
,
44 gss_cred_id_t
* output_cred_handle
,
45 gss_OID_set
* actual_mechs
,
46 OM_uint32
* initiator_time_rec
, OM_uint32
* acceptor_time_rec
)
52 gss_inquire_cred (OM_uint32
* minor_status
,
53 const gss_cred_id_t cred_handle
,
56 gss_cred_usage_t
* cred_usage
, gss_OID_set
* mechanisms
)
62 gss_inquire_cred_by_mech (OM_uint32
* minor_status
,
63 const gss_cred_id_t cred_handle
,
64 const gss_OID mech_type
,
66 OM_uint32
* initiator_lifetime
,
67 OM_uint32
* acceptor_lifetime
,
68 gss_cred_usage_t
* cred_usage
)
75 * @minor_status: Mechanism specific status code.
76 * @cred_handle: Optional opaque handle identifying credential to be
77 * released. If GSS_C_NO_CREDENTIAL is supplied, the routine will
78 * complete successfully, but will do nothing.
80 * Informs GSS-API that the specified credential handle is no longer
81 * required by the application, and frees associated resources.
82 * Implementations are encouraged to set the cred_handle to
83 * GSS_C_NO_CREDENTIAL on successful completion of this call.
85 * Return value: Returns GSS_S_COMPLETE for successful completion, and
86 * GSS_S_NO_CRED for credentials could not be accessed.
89 gss_release_cred (OM_uint32
* minor_status
, gss_cred_id_t
* cred_handle
)
91 if (cred_handle
&& *cred_handle
)
94 *cred_handle
= GSS_C_NO_CREDENTIAL
;
98 return GSS_S_COMPLETE
;