1c0b9f4feSDoug Rabson.\" -*- nroff -*- 2c0b9f4feSDoug Rabson.\" 3c0b9f4feSDoug Rabson.\" Copyright (c) 2005 Doug Rabson 4c0b9f4feSDoug Rabson.\" All rights reserved. 5c0b9f4feSDoug Rabson.\" 6c0b9f4feSDoug Rabson.\" Redistribution and use in source and binary forms, with or without 7c0b9f4feSDoug Rabson.\" modification, are permitted provided that the following conditions 8c0b9f4feSDoug Rabson.\" are met: 9c0b9f4feSDoug Rabson.\" 1. Redistributions of source code must retain the above copyright 10c0b9f4feSDoug Rabson.\" notice, this list of conditions and the following disclaimer. 11c0b9f4feSDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright 12c0b9f4feSDoug Rabson.\" notice, this list of conditions and the following disclaimer in the 13c0b9f4feSDoug Rabson.\" documentation and/or other materials provided with the distribution. 14c0b9f4feSDoug Rabson.\" 15c0b9f4feSDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16c0b9f4feSDoug Rabson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17c0b9f4feSDoug Rabson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18c0b9f4feSDoug Rabson.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19c0b9f4feSDoug Rabson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20c0b9f4feSDoug Rabson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21c0b9f4feSDoug Rabson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22c0b9f4feSDoug Rabson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23c0b9f4feSDoug Rabson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24c0b9f4feSDoug Rabson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25c0b9f4feSDoug Rabson.\" SUCH DAMAGE. 26c0b9f4feSDoug Rabson.\" 27c0b9f4feSDoug Rabson.\" $FreeBSD$ 28c0b9f4feSDoug Rabson.\" 29c0b9f4feSDoug Rabson.\" The following commands are required for all man pages. 30d76ba3efSGavin Atkinson.Dd January 26, 2010 31c0b9f4feSDoug Rabson.Dt GSS_ACQUIRE_CRED 3 PRM 32*aa12cea2SUlrich Spörlein.Os 33c0b9f4feSDoug Rabson.Sh NAME 34c0b9f4feSDoug Rabson.Nm gss_acquire_cred 35c0b9f4feSDoug Rabson.Nd Obtain a GSS-API credential handle for pre-existing credentials 36c0b9f4feSDoug Rabson.\" This next command is for sections 2 and 3 only. 37c0b9f4feSDoug Rabson.\" .Sh LIBRARY 38c0b9f4feSDoug Rabson.Sh SYNOPSIS 39c0b9f4feSDoug Rabson.In "gssapi/gssapi.h" 40c0b9f4feSDoug Rabson.Ft OM_uint32 41c0b9f4feSDoug Rabson.Fo gss_acquire_cred 42c0b9f4feSDoug Rabson.Fa "OM_uint32 *minor_status" 43c0b9f4feSDoug Rabson.Fa "const gss_name_t desired_name" 44c0b9f4feSDoug Rabson.Fa "OM_uint32 time_req" 45c0b9f4feSDoug Rabson.Fa "const gss_OID_set desired_mechs" 46c0b9f4feSDoug Rabson.Fa "gss_cred_usage_t cred_usage" 47c0b9f4feSDoug Rabson.Fa "gss_cred_id_t *output_cred_handle" 48c0b9f4feSDoug Rabson.Fa "gss_OID_set *actual_mechs" 49c0b9f4feSDoug Rabson.Fa "OM_uint32 *time_rec" 50c0b9f4feSDoug Rabson.Fc 51c0b9f4feSDoug Rabson.Sh DESCRIPTION 52c0b9f4feSDoug RabsonAllows an application to acquire a handle for a pre-existing 53c0b9f4feSDoug Rabsoncredential by name. 54c0b9f4feSDoug RabsonGSS-API implementations must impose a local 55c0b9f4feSDoug Rabsonaccess-control policy on callers of this routine to prevent 56c0b9f4feSDoug Rabsonunauthorized callers from acquiring credentials to which they are not 57c0b9f4feSDoug Rabsonentitled. 58c0b9f4feSDoug RabsonThis routine is not intended to provide a "login to the 59c0b9f4feSDoug Rabsonnetwork" function, as such a function would involve the creation of 60c0b9f4feSDoug Rabsonnew credentials rather than merely acquiring a handle to existing 61c0b9f4feSDoug Rabsoncredentials. 62c0b9f4feSDoug RabsonSuch functions, if required, should be defined in 63c0b9f4feSDoug Rabsonimplementation-specific extensions to the API. 64c0b9f4feSDoug Rabson.Pp 65c0b9f4feSDoug RabsonIf desired_name is 66c0b9f4feSDoug Rabson.Dv GSS_C_NO_NAME , 67c0b9f4feSDoug Rabsonthe call is interpreted as a 68c0b9f4feSDoug Rabsonrequest for a credential handle that will invoke default behavior 69c0b9f4feSDoug Rabsonwhen passed to 70c0b9f4feSDoug Rabson.Fn gss_init_sec_context 71c0b9f4feSDoug Rabson(if cred_usage is 72c0b9f4feSDoug Rabson.Dv GSS_C_INITIATE 73c0b9f4feSDoug Rabsonor 74c0b9f4feSDoug Rabson.Dv GSS_C_BOTH ) 75c0b9f4feSDoug Rabsonor 76c0b9f4feSDoug Rabson.Fn gss_accept_sec_context 77c0b9f4feSDoug Rabson(if cred_usage is 78c0b9f4feSDoug Rabson.Dv GSS_C_ACCEPT 79c0b9f4feSDoug Rabsonor 80c0b9f4feSDoug Rabson.Dv GSS_C_BOTH ). 81c0b9f4feSDoug Rabson.Pp 82c0b9f4feSDoug RabsonMechanisms should honor the 83c0b9f4feSDoug Rabson.Fa desired_mechs 84c0b9f4feSDoug Rabsonparameter, 85c0b9f4feSDoug Rabsonand return a credential that is suitable to use only with the 86c0b9f4feSDoug Rabsonrequested mechanisms. 87c0b9f4feSDoug RabsonAn exception to this is the case where one underlying credential 88c0b9f4feSDoug Rabsonelement can be shared by multiple mechanisms; 89c0b9f4feSDoug Rabsonin this case it is permissible for an implementation to indicate all 90c0b9f4feSDoug Rabsonmechanisms with which the credential element may be used. 91c0b9f4feSDoug RabsonIf 92c0b9f4feSDoug Rabson.Fa desired_mechs 93c0b9f4feSDoug Rabsonis an empty set, behavior is undefined. 94c0b9f4feSDoug Rabson.Pp 95c0b9f4feSDoug RabsonThis routine is expected to be used primarily by context acceptors, 96c0b9f4feSDoug Rabsonsince implementations are likely to provide mechanism-specific ways 97c0b9f4feSDoug Rabsonof obtaining GSS-API initiator credentials from the system login 98c0b9f4feSDoug Rabsonprocess. 99c0b9f4feSDoug RabsonSome implementations may therefore not support the acquisition of 100c0b9f4feSDoug Rabson.Dv GSS_C_INITIATE 101c0b9f4feSDoug Rabsonor 102c0b9f4feSDoug Rabson.Dv GSS_C_BOTH 103c0b9f4feSDoug Rabsoncredentials via 104c0b9f4feSDoug Rabson.Fn gss_acquire_cred 105c0b9f4feSDoug Rabsonfor any name other than 106c0b9f4feSDoug Rabson.Dv GSS_C_NO_NAME , 107c0b9f4feSDoug Rabsonor a name produced by applying either 108c0b9f4feSDoug Rabson.Fn gss_inquire_cred 109c0b9f4feSDoug Rabsonto a valid credential, or 110c0b9f4feSDoug Rabson.Fn gss_inquire_context 111c0b9f4feSDoug Rabsonto an active context. 112c0b9f4feSDoug Rabson.Pp 113c0b9f4feSDoug RabsonIf credential acquisition is time-consuming for a mechanism, 114c0b9f4feSDoug Rabsonthe mechanism may choose to delay the actual acquisition until the 115c0b9f4feSDoug Rabsoncredential is required 116c0b9f4feSDoug Rabson(e.g. by 117c0b9f4feSDoug Rabson.Fn gss_init_sec_context 118c0b9f4feSDoug Rabsonor 119c0b9f4feSDoug Rabson.Fn gss_accept_sec_context ). 120c0b9f4feSDoug RabsonSuch mechanism-specific implementation 121c0b9f4feSDoug Rabsondecisions should be invisible to the calling application; 122c0b9f4feSDoug Rabsonthus a call of 123c0b9f4feSDoug Rabson.Fn gss_inquire_cred 124c0b9f4feSDoug Rabsonimmediately following the call of 125c0b9f4feSDoug Rabson.Fn gss_acquire_cred 126c0b9f4feSDoug Rabsonmust return valid credential data, 127c0b9f4feSDoug Rabsonand may therefore incur the overhead of a deferred credential acquisition. 128c0b9f4feSDoug Rabson.Sh PARAMETERS 129c0b9f4feSDoug Rabson.Bl -tag 130c0b9f4feSDoug Rabson.It desired_name 131c0b9f4feSDoug RabsonName of principal whose credential should be acquired. 132c0b9f4feSDoug Rabson.It time_req 133c0b9f4feSDoug RabsonNumber of seconds that credentials should remain valid. 134c0b9f4feSDoug RabsonSpecify 135c0b9f4feSDoug Rabson.Dv GSS_C_INDEFINITE 136c0b9f4feSDoug Rabsonto request that the credentials have the maximum 137c0b9f4feSDoug Rabsonpermitted lifetime. 138c0b9f4feSDoug Rabson.It desired_mechs 139c0b9f4feSDoug RabsonSet of underlying security mechanisms that may be used. 140c0b9f4feSDoug Rabson.Dv GSS_C_NO_OID_SET 141c0b9f4feSDoug Rabsonmay be used to obtain an implementation-specific default. 142c0b9f4feSDoug Rabson.It cred_usage 143c0b9f4feSDoug Rabson.Bl -tag -width "GSS_C_INITIATE" 144c0b9f4feSDoug Rabson.It GSS_C_BOTH 145c0b9f4feSDoug RabsonCredentials may be used either to initiate or accept security 146c0b9f4feSDoug Rabsoncontexts. 147c0b9f4feSDoug Rabson.It GSS_C_INITIATE 148c0b9f4feSDoug RabsonCredentials will only be used to initiate security contexts. 149c0b9f4feSDoug Rabson.It GSS_C_ACCEPT 150c0b9f4feSDoug RabsonCredentials will only be used to accept security contexts. 151c0b9f4feSDoug Rabson.El 152c0b9f4feSDoug Rabson.It output_cred_handle 153c0b9f4feSDoug RabsonThe returned credential handle. 154c0b9f4feSDoug RabsonResources 155c0b9f4feSDoug Rabsonassociated with this credential handle must be released by 156c0b9f4feSDoug Rabsonthe application after use with a call to 157c0b9f4feSDoug Rabson.Fn gss_release_cred . 158c0b9f4feSDoug Rabson.It actual_mechs 159c0b9f4feSDoug RabsonThe set of mechanisms for which the credential is valid. 160c0b9f4feSDoug RabsonStorage associated with the returned OID-set must be released by the 161c0b9f4feSDoug Rabsonapplication after use with a call to 162c0b9f4feSDoug Rabson.Fn gss_release_oid_set . 163c0b9f4feSDoug RabsonSpecify 164c0b9f4feSDoug Rabson.Dv NULL if not required. 165c0b9f4feSDoug Rabson.It time_rec 166c0b9f4feSDoug RabsonActual number of seconds for which the returned credentials will 167c0b9f4feSDoug Rabsonremain valid. 168c0b9f4feSDoug RabsonIf the implementation does not support expiration of credentials, 169c0b9f4feSDoug Rabsonthe value 170c0b9f4feSDoug Rabson.Dv GSS_C_INDEFINITE 171c0b9f4feSDoug Rabsonwill be returned. 172c0b9f4feSDoug RabsonSpecify NULL if not required. 173c0b9f4feSDoug Rabson.It minor_status 174c0b9f4feSDoug RabsonMechanism specific status code. 175c0b9f4feSDoug Rabson.El 176c0b9f4feSDoug Rabson.Sh RETURN VALUES 177c0b9f4feSDoug Rabson.Bl -tag 178c0b9f4feSDoug Rabson.It GSS_S_COMPLETE 179c0b9f4feSDoug RabsonSuccessful completion. 180c0b9f4feSDoug Rabson.It GSS_S_BAD_MECH 181c0b9f4feSDoug RabsonUnavailable mechanism requested. 182c0b9f4feSDoug Rabson.It GSS_S_BAD_NAMETYPE 183c0b9f4feSDoug RabsonType contained within desired_name parameter is not supported. 184c0b9f4feSDoug Rabson.It GSS_S_BAD_NAME 185c0b9f4feSDoug RabsonValue supplied for desired_name parameter is ill formed. 186c0b9f4feSDoug Rabson.It GSS_S_CREDENTIALS_EXPIRED 187c0b9f4feSDoug RabsonThe credentials could not be acquired Because they have expired. 188c0b9f4feSDoug Rabson.It GSS_S_NO_CRED 189c0b9f4feSDoug RabsonNo credentials were found for the specified name. 190c0b9f4feSDoug Rabson.El 191c0b9f4feSDoug Rabson.Sh SEE ALSO 192c0b9f4feSDoug Rabson.Xr gss_init_sec_context 3 , 193c0b9f4feSDoug Rabson.Xr gss_accept_sec_context 3 , 194c0b9f4feSDoug Rabson.Xr gss_inquire_cred 3 , 195c0b9f4feSDoug Rabson.Xr gss_inquire_context 3 , 196c0b9f4feSDoug Rabson.Xr gss_release_cred 3 , 197c0b9f4feSDoug Rabson.Xr gss_release_oid_set 3 198c0b9f4feSDoug Rabson.Sh STANDARDS 199c0b9f4feSDoug Rabson.Bl -tag 200c0b9f4feSDoug Rabson.It RFC 2743 201c0b9f4feSDoug RabsonGeneric Security Service Application Program Interface Version 2, Update 1 202c0b9f4feSDoug Rabson.It RFC 2744 203c0b9f4feSDoug RabsonGeneric Security Service API Version 2 : C-bindings 204c0b9f4feSDoug Rabson.El 205c0b9f4feSDoug Rabson.Sh HISTORY 206c0b9f4feSDoug RabsonThe 207c0b9f4feSDoug Rabson.Nm 208d76ba3efSGavin Atkinsonfunction first appeared in 209c0b9f4feSDoug Rabson.Fx 7.0 . 210c0b9f4feSDoug Rabson.Sh AUTHORS 211c0b9f4feSDoug RabsonJohn Wray, Iris Associates 21260b9f20aSDoug Rabson.Sh COPYRIGHT 21360b9f20aSDoug RabsonCopyright (C) The Internet Society (2000). All Rights Reserved. 21460b9f20aSDoug Rabson.Pp 21560b9f20aSDoug RabsonThis document and translations of it may be copied and furnished to 21660b9f20aSDoug Rabsonothers, and derivative works that comment on or otherwise explain it 21760b9f20aSDoug Rabsonor assist in its implementation may be prepared, copied, published 21860b9f20aSDoug Rabsonand distributed, in whole or in part, without restriction of any 21960b9f20aSDoug Rabsonkind, provided that the above copyright notice and this paragraph are 22060b9f20aSDoug Rabsonincluded on all such copies and derivative works. However, this 22160b9f20aSDoug Rabsondocument itself may not be modified in any way, such as by removing 22260b9f20aSDoug Rabsonthe copyright notice or references to the Internet Society or other 22360b9f20aSDoug RabsonInternet organizations, except as needed for the purpose of 22460b9f20aSDoug Rabsondeveloping Internet standards in which case the procedures for 22560b9f20aSDoug Rabsoncopyrights defined in the Internet Standards process must be 22660b9f20aSDoug Rabsonfollowed, or as required to translate it into languages other than 22760b9f20aSDoug RabsonEnglish. 22860b9f20aSDoug Rabson.Pp 22960b9f20aSDoug RabsonThe limited permissions granted above are perpetual and will not be 23060b9f20aSDoug Rabsonrevoked by the Internet Society or its successors or assigns. 23160b9f20aSDoug Rabson.Pp 23260b9f20aSDoug RabsonThis document and the information contained herein is provided on an 23360b9f20aSDoug Rabson"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 23460b9f20aSDoug RabsonTASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 23560b9f20aSDoug RabsonBUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 23660b9f20aSDoug RabsonHEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 23760b9f20aSDoug RabsonMERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 238