/crypto/heimdal/lib/gssapi/gssapi/gssapi.h

https://bitbucket.org/freebsd/freebsd-head/ · C Header · 1120 lines · 723 code · 168 blank · 229 comment · 12 complexity · 7dc5753e78eb2788200ecf08ec9ffc53 MD5 · raw file

  1. /*
  2. * Copyright (c) 1997 - 2007 Kungliga Tekniska Hรถgskolan
  3. * (Royal Institute of Technology, Stockholm, Sweden).
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. *
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in the
  15. * documentation and/or other materials provided with the distribution.
  16. *
  17. * 3. Neither the name of the Institute nor the names of its contributors
  18. * may be used to endorse or promote products derived from this software
  19. * without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
  22. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
  25. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31. * SUCH DAMAGE.
  32. */
  33. #ifndef GSSAPI_GSSAPI_H_
  34. #define GSSAPI_GSSAPI_H_
  35. /*
  36. * First, include stddef.h to get size_t defined.
  37. */
  38. #include <stddef.h>
  39. #include <krb5-types.h>
  40. #ifndef BUILD_GSSAPI_LIB
  41. #if defined(_WIN32)
  42. #define GSSAPI_LIB_FUNCTION __declspec(dllimport)
  43. #define GSSAPI_LIB_CALL __stdcall
  44. #define GSSAPI_LIB_VARIABLE __declspec(dllimport)
  45. #else
  46. #define GSSAPI_LIB_FUNCTION
  47. #define GSSAPI_LIB_CALL
  48. #define GSSAPI_LIB_VARIABLE
  49. #endif
  50. #endif
  51. #ifndef GSSAPI_DEPRECATED_FUNCTION
  52. #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
  53. #define GSSAPI_DEPRECATED_FUNCTION(X) __attribute__((deprecated))
  54. #else
  55. #define GSSAPI_DEPRECATED_FUNCTION(X)
  56. #endif
  57. #endif
  58. /* Compatiblity with MIT Kerberos on the Mac */
  59. #if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
  60. #pragma pack(push,2)
  61. #endif
  62. #ifdef __cplusplus
  63. #define GSSAPI_CPP_START extern "C" {
  64. #define GSSAPI_CPP_END }
  65. #else
  66. #define GSSAPI_CPP_START
  67. #define GSSAPI_CPP_END
  68. #endif
  69. #ifdef _WIN32
  70. #define GSSAPI_CALLCONV __stdcall
  71. #else
  72. #define GSSAPI_CALLCONV
  73. #endif
  74. /*
  75. * Now define the three implementation-dependent types.
  76. */
  77. typedef uint32_t OM_uint32;
  78. typedef uint64_t OM_uint64;
  79. typedef uint32_t gss_uint32;
  80. struct gss_name_t_desc_struct;
  81. typedef struct gss_name_t_desc_struct *gss_name_t;
  82. typedef const struct gss_name_t_desc_struct *gss_const_name_t;
  83. struct gss_ctx_id_t_desc_struct;
  84. typedef struct gss_ctx_id_t_desc_struct *gss_ctx_id_t;
  85. typedef const struct gss_ctx_id_t_desc_struct gss_const_ctx_id_t;
  86. typedef struct gss_OID_desc_struct {
  87. OM_uint32 length;
  88. void *elements;
  89. } gss_OID_desc, *gss_OID;
  90. typedef const gss_OID_desc * gss_const_OID;
  91. typedef struct gss_OID_set_desc_struct {
  92. size_t count;
  93. gss_OID elements;
  94. } gss_OID_set_desc, *gss_OID_set;
  95. typedef const gss_OID_set_desc * gss_const_OID_set;
  96. typedef int gss_cred_usage_t;
  97. struct gss_cred_id_t_desc_struct;
  98. typedef struct gss_cred_id_t_desc_struct *gss_cred_id_t;
  99. typedef const struct gss_cred_id_t_desc_struct *gss_const_cred_id_t;
  100. typedef struct gss_buffer_desc_struct {
  101. size_t length;
  102. void *value;
  103. } gss_buffer_desc, *gss_buffer_t;
  104. typedef const gss_buffer_desc * gss_const_buffer_t;
  105. typedef struct gss_channel_bindings_struct {
  106. OM_uint32 initiator_addrtype;
  107. gss_buffer_desc initiator_address;
  108. OM_uint32 acceptor_addrtype;
  109. gss_buffer_desc acceptor_address;
  110. gss_buffer_desc application_data;
  111. } *gss_channel_bindings_t;
  112. typedef const struct gss_channel_bindings_struct *gss_const_channel_bindings_t;
  113. /* GGF extension data types */
  114. typedef struct gss_buffer_set_desc_struct {
  115. size_t count;
  116. gss_buffer_desc *elements;
  117. } gss_buffer_set_desc, *gss_buffer_set_t;
  118. typedef struct gss_iov_buffer_desc_struct {
  119. OM_uint32 type;
  120. gss_buffer_desc buffer;
  121. } gss_iov_buffer_desc, *gss_iov_buffer_t;
  122. /*
  123. * For now, define a QOP-type as an OM_uint32
  124. */
  125. typedef OM_uint32 gss_qop_t;
  126. /*
  127. * Flag bits for context-level services.
  128. */
  129. #define GSS_C_DELEG_FLAG 1
  130. #define GSS_C_MUTUAL_FLAG 2
  131. #define GSS_C_REPLAY_FLAG 4
  132. #define GSS_C_SEQUENCE_FLAG 8
  133. #define GSS_C_CONF_FLAG 16
  134. #define GSS_C_INTEG_FLAG 32
  135. #define GSS_C_ANON_FLAG 64
  136. #define GSS_C_PROT_READY_FLAG 128
  137. #define GSS_C_TRANS_FLAG 256
  138. #define GSS_C_DCE_STYLE 4096
  139. #define GSS_C_IDENTIFY_FLAG 8192
  140. #define GSS_C_EXTENDED_ERROR_FLAG 16384
  141. #define GSS_C_DELEG_POLICY_FLAG 32768
  142. /*
  143. * Credential usage options
  144. */
  145. #define GSS_C_BOTH 0
  146. #define GSS_C_INITIATE 1
  147. #define GSS_C_ACCEPT 2
  148. /*
  149. * Status code types for gss_display_status
  150. */
  151. #define GSS_C_GSS_CODE 1
  152. #define GSS_C_MECH_CODE 2
  153. /*
  154. * The constant definitions for channel-bindings address families
  155. */
  156. #define GSS_C_AF_UNSPEC 0
  157. #define GSS_C_AF_LOCAL 1
  158. #define GSS_C_AF_INET 2
  159. #define GSS_C_AF_IMPLINK 3
  160. #define GSS_C_AF_PUP 4
  161. #define GSS_C_AF_CHAOS 5
  162. #define GSS_C_AF_NS 6
  163. #define GSS_C_AF_NBS 7
  164. #define GSS_C_AF_ECMA 8
  165. #define GSS_C_AF_DATAKIT 9
  166. #define GSS_C_AF_CCITT 10
  167. #define GSS_C_AF_SNA 11
  168. #define GSS_C_AF_DECnet 12
  169. #define GSS_C_AF_DLI 13
  170. #define GSS_C_AF_LAT 14
  171. #define GSS_C_AF_HYLINK 15
  172. #define GSS_C_AF_APPLETALK 16
  173. #define GSS_C_AF_BSC 17
  174. #define GSS_C_AF_DSS 18
  175. #define GSS_C_AF_OSI 19
  176. #define GSS_C_AF_X25 21
  177. #define GSS_C_AF_INET6 24
  178. #define GSS_C_AF_NULLADDR 255
  179. /*
  180. * Various Null values
  181. */
  182. #define GSS_C_NO_NAME ((gss_name_t) 0)
  183. #define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
  184. #define GSS_C_NO_BUFFER_SET ((gss_buffer_set_t) 0)
  185. #define GSS_C_NO_OID ((gss_OID) 0)
  186. #define GSS_C_NO_OID_SET ((gss_OID_set) 0)
  187. #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
  188. #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
  189. #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
  190. #define GSS_C_EMPTY_BUFFER {0, NULL}
  191. #define GSS_C_NO_IOV_BUFFER ((gss_iov_buffer_t)0)
  192. /*
  193. * Some alternate names for a couple of the above
  194. * values. These are defined for V1 compatibility.
  195. */
  196. #define GSS_C_NULL_OID GSS_C_NO_OID
  197. #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
  198. /*
  199. * Define the default Quality of Protection for per-message
  200. * services. Note that an implementation that offers multiple
  201. * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero
  202. * (as done here) to mean "default protection", or to a specific
  203. * explicit QOP value. However, a value of 0 should always be
  204. * interpreted by a GSSAPI implementation as a request for the
  205. * default protection level.
  206. */
  207. #define GSS_C_QOP_DEFAULT 0
  208. #define GSS_KRB5_CONF_C_QOP_DES 0x0100
  209. #define GSS_KRB5_CONF_C_QOP_DES3_KD 0x0200
  210. /*
  211. * Expiration time of 2^32-1 seconds means infinite lifetime for a
  212. * credential or security context
  213. */
  214. #define GSS_C_INDEFINITE 0xfffffffful
  215. /*
  216. * Type of gss_wrap_iov()/gss_unwrap_iov().
  217. */
  218. #define GSS_IOV_BUFFER_TYPE_EMPTY 0
  219. #define GSS_IOV_BUFFER_TYPE_DATA 1
  220. #define GSS_IOV_BUFFER_TYPE_HEADER 2
  221. #define GSS_IOV_BUFFER_TYPE_MECH_PARAMS 3
  222. #define GSS_IOV_BUFFER_TYPE_TRAILER 7
  223. #define GSS_IOV_BUFFER_TYPE_PADDING 9
  224. #define GSS_IOV_BUFFER_TYPE_STREAM 10
  225. #define GSS_IOV_BUFFER_TYPE_SIGN_ONLY 11
  226. #define GSS_IOV_BUFFER_TYPE_FLAG_MASK 0xffff0000
  227. #define GSS_IOV_BUFFER_FLAG_ALLOCATE 0x00010000
  228. #define GSS_IOV_BUFFER_FLAG_ALLOCATED 0x00020000
  229. #define GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATE 0x00010000 /* old name */
  230. #define GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATED 0x00020000 /* old name */
  231. #define GSS_IOV_BUFFER_TYPE(_t) ((_t) & ~GSS_IOV_BUFFER_TYPE_FLAG_MASK)
  232. #define GSS_IOV_BUFFER_FLAGS(_t) ((_t) & GSS_IOV_BUFFER_TYPE_FLAG_MASK)
  233. GSSAPI_CPP_START
  234. #include <gssapi/gssapi_oid.h>
  235. /*
  236. * The implementation must reserve static storage for a
  237. * gss_OID_desc object containing the value
  238. * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
  239. * "\x01\x02\x01\x01"},
  240. * corresponding to an object-identifier value of
  241. * {iso(1) member-body(2) United States(840) mit(113554)
  242. * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
  243. * GSS_C_NT_USER_NAME should be initialized to point
  244. * to that gss_OID_desc.
  245. */
  246. extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_user_name_oid_desc;
  247. #define GSS_C_NT_USER_NAME (&__gss_c_nt_user_name_oid_desc)
  248. /*
  249. * The implementation must reserve static storage for a
  250. * gss_OID_desc object containing the value
  251. * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
  252. * "\x01\x02\x01\x02"},
  253. * corresponding to an object-identifier value of
  254. * {iso(1) member-body(2) United States(840) mit(113554)
  255. * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
  256. * The constant GSS_C_NT_MACHINE_UID_NAME should be
  257. * initialized to point to that gss_OID_desc.
  258. */
  259. extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_machine_uid_name_oid_desc;
  260. #define GSS_C_NT_MACHINE_UID_NAME (&__gss_c_nt_machine_uid_name_oid_desc)
  261. /*
  262. * The implementation must reserve static storage for a
  263. * gss_OID_desc object containing the value
  264. * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
  265. * "\x01\x02\x01\x03"},
  266. * corresponding to an object-identifier value of
  267. * {iso(1) member-body(2) United States(840) mit(113554)
  268. * infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
  269. * The constant GSS_C_NT_STRING_UID_NAME should be
  270. * initialized to point to that gss_OID_desc.
  271. */
  272. extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_string_uid_name_oid_desc;
  273. #define GSS_C_NT_STRING_UID_NAME (&__gss_c_nt_string_uid_name_oid_desc)
  274. /*
  275. * The implementation must reserve static storage for a
  276. * gss_OID_desc object containing the value
  277. * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
  278. * corresponding to an object-identifier value of
  279. * {iso(1) org(3) dod(6) internet(1) security(5)
  280. * nametypes(6) gss-host-based-services(2)). The constant
  281. * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
  282. * to that gss_OID_desc. This is a deprecated OID value, and
  283. * implementations wishing to support hostbased-service names
  284. * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
  285. * defined below, to identify such names;
  286. * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
  287. * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
  288. * parameter, but should not be emitted by GSS-API
  289. * implementations
  290. */
  291. extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_hostbased_service_x_oid_desc;
  292. #define GSS_C_NT_HOSTBASED_SERVICE_X (&__gss_c_nt_hostbased_service_x_oid_desc)
  293. /*
  294. * The implementation must reserve static storage for a
  295. * gss_OID_desc object containing the value
  296. * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
  297. * "\x01\x02\x01\x04"}, corresponding to an
  298. * object-identifier value of {iso(1) member-body(2)
  299. * Unites States(840) mit(113554) infosys(1) gssapi(2)
  300. * generic(1) service_name(4)}. The constant
  301. * GSS_C_NT_HOSTBASED_SERVICE should be initialized
  302. * to point to that gss_OID_desc.
  303. */
  304. extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_hostbased_service_oid_desc;
  305. #define GSS_C_NT_HOSTBASED_SERVICE (&__gss_c_nt_hostbased_service_oid_desc)
  306. /*
  307. * The implementation must reserve static storage for a
  308. * gss_OID_desc object containing the value
  309. * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
  310. * corresponding to an object identifier value of
  311. * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
  312. * 6(nametypes), 3(gss-anonymous-name)}. The constant
  313. * and GSS_C_NT_ANONYMOUS should be initialized to point
  314. * to that gss_OID_desc.
  315. */
  316. extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_anonymous_oid_desc;
  317. #define GSS_C_NT_ANONYMOUS (&__gss_c_nt_anonymous_oid_desc)
  318. /*
  319. * The implementation must reserve static storage for a
  320. * gss_OID_desc object containing the value
  321. * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
  322. * corresponding to an object-identifier value of
  323. * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
  324. * 6(nametypes), 4(gss-api-exported-name)}. The constant
  325. * GSS_C_NT_EXPORT_NAME should be initialized to point
  326. * to that gss_OID_desc.
  327. */
  328. extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_export_name_oid_desc;
  329. #define GSS_C_NT_EXPORT_NAME (&__gss_c_nt_export_name_oid_desc)
  330. /* Major status codes */
  331. #define GSS_S_COMPLETE 0
  332. /*
  333. * Some "helper" definitions to make the status code macros obvious.
  334. */
  335. #define GSS_C_CALLING_ERROR_OFFSET 24
  336. #define GSS_C_ROUTINE_ERROR_OFFSET 16
  337. #define GSS_C_SUPPLEMENTARY_OFFSET 0
  338. #define GSS_C_CALLING_ERROR_MASK 0377ul
  339. #define GSS_C_ROUTINE_ERROR_MASK 0377ul
  340. #define GSS_C_SUPPLEMENTARY_MASK 0177777ul
  341. /*
  342. * The macros that test status codes for error conditions.
  343. * Note that the GSS_ERROR() macro has changed slightly from
  344. * the V1 GSSAPI so that it now evaluates its argument
  345. * only once.
  346. */
  347. #define GSS_CALLING_ERROR(x) \
  348. (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
  349. #define GSS_ROUTINE_ERROR(x) \
  350. (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
  351. #define GSS_SUPPLEMENTARY_INFO(x) \
  352. (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
  353. #define GSS_ERROR(x) \
  354. (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
  355. (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
  356. /*
  357. * Now the actual status code definitions
  358. */
  359. /*
  360. * Calling errors:
  361. */
  362. #define GSS_S_CALL_INACCESSIBLE_READ \
  363. (1ul << GSS_C_CALLING_ERROR_OFFSET)
  364. #define GSS_S_CALL_INACCESSIBLE_WRITE \
  365. (2ul << GSS_C_CALLING_ERROR_OFFSET)
  366. #define GSS_S_CALL_BAD_STRUCTURE \
  367. (3ul << GSS_C_CALLING_ERROR_OFFSET)
  368. /*
  369. * Routine errors:
  370. */
  371. #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
  372. #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
  373. #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
  374. #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
  375. #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
  376. #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
  377. #define GSS_S_BAD_MIC GSS_S_BAD_SIG
  378. #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
  379. #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
  380. #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
  381. #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
  382. #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
  383. #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
  384. #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
  385. #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
  386. #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
  387. #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
  388. #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
  389. #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
  390. #define GSS_S_BAD_MECH_ATTR (19ul << GSS_C_ROUTINE_ERROR_OFFSET)
  391. /*
  392. * Apparently awating spec fix.
  393. */
  394. #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE
  395. /*
  396. * Supplementary info bits:
  397. */
  398. #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
  399. #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
  400. #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
  401. #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
  402. #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
  403. /*
  404. * Finally, function prototypes for the GSS-API routines.
  405. */
  406. #define GSS_C_OPTION_MASK 0xffff
  407. #define GSS_C_CRED_NO_UI 0x10000
  408. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_acquire_cred
  409. (OM_uint32 * /*minor_status*/,
  410. const gss_name_t /*desired_name*/,
  411. OM_uint32 /*time_req*/,
  412. const gss_OID_set /*desired_mechs*/,
  413. gss_cred_usage_t /*cred_usage*/,
  414. gss_cred_id_t * /*output_cred_handle*/,
  415. gss_OID_set * /*actual_mechs*/,
  416. OM_uint32 * /*time_rec*/
  417. );
  418. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_cred
  419. (OM_uint32 * /*minor_status*/,
  420. gss_cred_id_t * /*cred_handle*/
  421. );
  422. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_init_sec_context
  423. (OM_uint32 * /*minor_status*/,
  424. const gss_cred_id_t /*initiator_cred_handle*/,
  425. gss_ctx_id_t * /*context_handle*/,
  426. const gss_name_t /*target_name*/,
  427. const gss_OID /*mech_type*/,
  428. OM_uint32 /*req_flags*/,
  429. OM_uint32 /*time_req*/,
  430. const gss_channel_bindings_t /*input_chan_bindings*/,
  431. const gss_buffer_t /*input_token*/,
  432. gss_OID * /*actual_mech_type*/,
  433. gss_buffer_t /*output_token*/,
  434. OM_uint32 * /*ret_flags*/,
  435. OM_uint32 * /*time_rec*/
  436. );
  437. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_accept_sec_context
  438. (OM_uint32 * /*minor_status*/,
  439. gss_ctx_id_t * /*context_handle*/,
  440. const gss_cred_id_t /*acceptor_cred_handle*/,
  441. const gss_buffer_t /*input_token_buffer*/,
  442. const gss_channel_bindings_t /*input_chan_bindings*/,
  443. gss_name_t * /*src_name*/,
  444. gss_OID * /*mech_type*/,
  445. gss_buffer_t /*output_token*/,
  446. OM_uint32 * /*ret_flags*/,
  447. OM_uint32 * /*time_rec*/,
  448. gss_cred_id_t * /*delegated_cred_handle*/
  449. );
  450. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_process_context_token
  451. (OM_uint32 * /*minor_status*/,
  452. const gss_ctx_id_t /*context_handle*/,
  453. const gss_buffer_t /*token_buffer*/
  454. );
  455. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_delete_sec_context
  456. (OM_uint32 * /*minor_status*/,
  457. gss_ctx_id_t * /*context_handle*/,
  458. gss_buffer_t /*output_token*/
  459. );
  460. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_context_time
  461. (OM_uint32 * /*minor_status*/,
  462. const gss_ctx_id_t /*context_handle*/,
  463. OM_uint32 * /*time_rec*/
  464. );
  465. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_get_mic
  466. (OM_uint32 * /*minor_status*/,
  467. const gss_ctx_id_t /*context_handle*/,
  468. gss_qop_t /*qop_req*/,
  469. const gss_buffer_t /*message_buffer*/,
  470. gss_buffer_t /*message_token*/
  471. );
  472. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify_mic
  473. (OM_uint32 * /*minor_status*/,
  474. const gss_ctx_id_t /*context_handle*/,
  475. const gss_buffer_t /*message_buffer*/,
  476. const gss_buffer_t /*token_buffer*/,
  477. gss_qop_t * /*qop_state*/
  478. );
  479. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap
  480. (OM_uint32 * /*minor_status*/,
  481. const gss_ctx_id_t /*context_handle*/,
  482. int /*conf_req_flag*/,
  483. gss_qop_t /*qop_req*/,
  484. const gss_buffer_t /*input_message_buffer*/,
  485. int * /*conf_state*/,
  486. gss_buffer_t /*output_message_buffer*/
  487. );
  488. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap
  489. (OM_uint32 * /*minor_status*/,
  490. const gss_ctx_id_t /*context_handle*/,
  491. const gss_buffer_t /*input_message_buffer*/,
  492. gss_buffer_t /*output_message_buffer*/,
  493. int * /*conf_state*/,
  494. gss_qop_t * /*qop_state*/
  495. );
  496. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_status
  497. (OM_uint32 * /*minor_status*/,
  498. OM_uint32 /*status_value*/,
  499. int /*status_type*/,
  500. const gss_OID /*mech_type*/,
  501. OM_uint32 * /*message_context*/,
  502. gss_buffer_t /*status_string*/
  503. );
  504. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_indicate_mechs
  505. (OM_uint32 * /*minor_status*/,
  506. gss_OID_set * /*mech_set*/
  507. );
  508. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_compare_name
  509. (OM_uint32 * /*minor_status*/,
  510. const gss_name_t /*name1*/,
  511. const gss_name_t /*name2*/,
  512. int * /*name_equal*/
  513. );
  514. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_name
  515. (OM_uint32 * /*minor_status*/,
  516. const gss_name_t /*input_name*/,
  517. gss_buffer_t /*output_name_buffer*/,
  518. gss_OID * /*output_name_type*/
  519. );
  520. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_name
  521. (OM_uint32 * /*minor_status*/,
  522. const gss_buffer_t /*input_name_buffer*/,
  523. const gss_OID /*input_name_type*/,
  524. gss_name_t * /*output_name*/
  525. );
  526. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_name
  527. (OM_uint32 * /*minor_status*/,
  528. const gss_name_t /*input_name*/,
  529. gss_buffer_t /*exported_name*/
  530. );
  531. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_name
  532. (OM_uint32 * /*minor_status*/,
  533. gss_name_t * /*input_name*/
  534. );
  535. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_buffer
  536. (OM_uint32 * /*minor_status*/,
  537. gss_buffer_t /*buffer*/
  538. );
  539. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_oid_set
  540. (OM_uint32 * /*minor_status*/,
  541. gss_OID_set * /*set*/
  542. );
  543. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred
  544. (OM_uint32 * /*minor_status*/,
  545. const gss_cred_id_t /*cred_handle*/,
  546. gss_name_t * /*name*/,
  547. OM_uint32 * /*lifetime*/,
  548. gss_cred_usage_t * /*cred_usage*/,
  549. gss_OID_set * /*mechanisms*/
  550. );
  551. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_context (
  552. OM_uint32 * /*minor_status*/,
  553. const gss_ctx_id_t /*context_handle*/,
  554. gss_name_t * /*src_name*/,
  555. gss_name_t * /*targ_name*/,
  556. OM_uint32 * /*lifetime_rec*/,
  557. gss_OID * /*mech_type*/,
  558. OM_uint32 * /*ctx_flags*/,
  559. int * /*locally_initiated*/,
  560. int * /*open_context*/
  561. );
  562. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_size_limit (
  563. OM_uint32 * /*minor_status*/,
  564. const gss_ctx_id_t /*context_handle*/,
  565. int /*conf_req_flag*/,
  566. gss_qop_t /*qop_req*/,
  567. OM_uint32 /*req_output_size*/,
  568. OM_uint32 * /*max_input_size*/
  569. );
  570. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_cred (
  571. OM_uint32 * /*minor_status*/,
  572. const gss_cred_id_t /*input_cred_handle*/,
  573. const gss_name_t /*desired_name*/,
  574. const gss_OID /*desired_mech*/,
  575. gss_cred_usage_t /*cred_usage*/,
  576. OM_uint32 /*initiator_time_req*/,
  577. OM_uint32 /*acceptor_time_req*/,
  578. gss_cred_id_t * /*output_cred_handle*/,
  579. gss_OID_set * /*actual_mechs*/,
  580. OM_uint32 * /*initiator_time_rec*/,
  581. OM_uint32 * /*acceptor_time_rec*/
  582. );
  583. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred_by_mech (
  584. OM_uint32 * /*minor_status*/,
  585. const gss_cred_id_t /*cred_handle*/,
  586. const gss_OID /*mech_type*/,
  587. gss_name_t * /*name*/,
  588. OM_uint32 * /*initiator_lifetime*/,
  589. OM_uint32 * /*acceptor_lifetime*/,
  590. gss_cred_usage_t * /*cred_usage*/
  591. );
  592. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_sec_context (
  593. OM_uint32 * /*minor_status*/,
  594. gss_ctx_id_t * /*context_handle*/,
  595. gss_buffer_t /*interprocess_token*/
  596. );
  597. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_sec_context (
  598. OM_uint32 * /*minor_status*/,
  599. const gss_buffer_t /*interprocess_token*/,
  600. gss_ctx_id_t * /*context_handle*/
  601. );
  602. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_create_empty_oid_set (
  603. OM_uint32 * /*minor_status*/,
  604. gss_OID_set * /*oid_set*/
  605. );
  606. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_oid_set_member (
  607. OM_uint32 * /*minor_status*/,
  608. const gss_OID /*member_oid*/,
  609. gss_OID_set * /*oid_set*/
  610. );
  611. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_test_oid_set_member (
  612. OM_uint32 * /*minor_status*/,
  613. const gss_OID /*member*/,
  614. const gss_OID_set /*set*/,
  615. int * /*present*/
  616. );
  617. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_names_for_mech (
  618. OM_uint32 * /*minor_status*/,
  619. const gss_OID /*mechanism*/,
  620. gss_OID_set * /*name_types*/
  621. );
  622. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_mechs_for_name (
  623. OM_uint32 * /*minor_status*/,
  624. const gss_name_t /*input_name*/,
  625. gss_OID_set * /*mech_types*/
  626. );
  627. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_canonicalize_name (
  628. OM_uint32 * /*minor_status*/,
  629. const gss_name_t /*input_name*/,
  630. const gss_OID /*mech_type*/,
  631. gss_name_t * /*output_name*/
  632. );
  633. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_duplicate_name (
  634. OM_uint32 * /*minor_status*/,
  635. const gss_name_t /*src_name*/,
  636. gss_name_t * /*dest_name*/
  637. );
  638. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_duplicate_oid (
  639. OM_uint32 * /* minor_status */,
  640. gss_OID /* src_oid */,
  641. gss_OID * /* dest_oid */
  642. );
  643. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  644. gss_release_oid
  645. (OM_uint32 * /*minor_status*/,
  646. gss_OID * /* oid */
  647. );
  648. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  649. gss_oid_to_str(
  650. OM_uint32 * /*minor_status*/,
  651. gss_OID /* oid */,
  652. gss_buffer_t /* str */
  653. );
  654. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  655. gss_inquire_sec_context_by_oid(
  656. OM_uint32 * minor_status,
  657. const gss_ctx_id_t context_handle,
  658. const gss_OID desired_object,
  659. gss_buffer_set_t *data_set
  660. );
  661. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  662. gss_set_sec_context_option (OM_uint32 *minor_status,
  663. gss_ctx_id_t *context_handle,
  664. const gss_OID desired_object,
  665. const gss_buffer_t value);
  666. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  667. gss_set_cred_option (OM_uint32 *minor_status,
  668. gss_cred_id_t *cred_handle,
  669. const gss_OID object,
  670. const gss_buffer_t value);
  671. GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL
  672. gss_oid_equal(gss_const_OID a, gss_const_OID b);
  673. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  674. gss_create_empty_buffer_set
  675. (OM_uint32 * minor_status,
  676. gss_buffer_set_t *buffer_set);
  677. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  678. gss_add_buffer_set_member
  679. (OM_uint32 * minor_status,
  680. const gss_buffer_t member_buffer,
  681. gss_buffer_set_t *buffer_set);
  682. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  683. gss_release_buffer_set
  684. (OM_uint32 * minor_status,
  685. gss_buffer_set_t *buffer_set);
  686. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  687. gss_inquire_cred_by_oid(OM_uint32 *minor_status,
  688. const gss_cred_id_t cred_handle,
  689. const gss_OID desired_object,
  690. gss_buffer_set_t *data_set);
  691. /*
  692. * RFC 4401
  693. */
  694. #define GSS_C_PRF_KEY_FULL 0
  695. #define GSS_C_PRF_KEY_PARTIAL 1
  696. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  697. gss_pseudo_random
  698. (OM_uint32 *minor_status,
  699. gss_ctx_id_t context,
  700. int prf_key,
  701. const gss_buffer_t prf_in,
  702. ssize_t desired_output_len,
  703. gss_buffer_t prf_out
  704. );
  705. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  706. gss_store_cred(OM_uint32 * /* minor_status */,
  707. gss_cred_id_t /* input_cred_handle */,
  708. gss_cred_usage_t /* cred_usage */,
  709. const gss_OID /* desired_mech */,
  710. OM_uint32 /* overwrite_cred */,
  711. OM_uint32 /* default_cred */,
  712. gss_OID_set * /* elements_stored */,
  713. gss_cred_usage_t * /* cred_usage_stored */);
  714. /*
  715. * Query functions
  716. */
  717. typedef struct {
  718. size_t header; /**< size of header */
  719. size_t trailer; /**< size of trailer */
  720. size_t max_msg_size; /**< maximum message size */
  721. size_t buffers; /**< extra GSS_IOV_BUFFER_TYPE_EMPTY buffer to pass */
  722. size_t blocksize; /**< Specificed optimal size of messages, also
  723. is the maximum padding size
  724. (GSS_IOV_BUFFER_TYPE_PADDING) */
  725. } gss_context_stream_sizes;
  726. extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_c_attr_stream_sizes_oid_desc;
  727. #define GSS_C_ATTR_STREAM_SIZES (&__gss_c_attr_stream_sizes_oid_desc)
  728. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  729. gss_context_query_attributes(OM_uint32 * /* minor_status */,
  730. const gss_ctx_id_t /* context_handle */,
  731. const gss_OID /* attribute */,
  732. void * /*data*/,
  733. size_t /* len */);
  734. /*
  735. * The following routines are obsolete variants of gss_get_mic,
  736. * gss_verify_mic, gss_wrap and gss_unwrap. They should be
  737. * provided by GSSAPI V2 implementations for backwards
  738. * compatibility with V1 applications. Distinct entrypoints
  739. * (as opposed to #defines) should be provided, both to allow
  740. * GSSAPI V1 applications to link against GSSAPI V2 implementations,
  741. * and to retain the slight parameter type differences between the
  742. * obsolete versions of these routines and their current forms.
  743. */
  744. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_sign
  745. (OM_uint32 * /*minor_status*/,
  746. gss_ctx_id_t /*context_handle*/,
  747. int /*qop_req*/,
  748. gss_buffer_t /*message_buffer*/,
  749. gss_buffer_t /*message_token*/
  750. ) GSSAPI_DEPRECATED_FUNCTION("Use gss_get_mic");
  751. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify
  752. (OM_uint32 * /*minor_status*/,
  753. gss_ctx_id_t /*context_handle*/,
  754. gss_buffer_t /*message_buffer*/,
  755. gss_buffer_t /*token_buffer*/,
  756. int * /*qop_state*/
  757. ) GSSAPI_DEPRECATED_FUNCTION("Use gss_verify_mic");
  758. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_seal
  759. (OM_uint32 * /*minor_status*/,
  760. gss_ctx_id_t /*context_handle*/,
  761. int /*conf_req_flag*/,
  762. int /*qop_req*/,
  763. gss_buffer_t /*input_message_buffer*/,
  764. int * /*conf_state*/,
  765. gss_buffer_t /*output_message_buffer*/
  766. ) GSSAPI_DEPRECATED_FUNCTION("Use gss_wrap");
  767. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unseal
  768. (OM_uint32 * /*minor_status*/,
  769. gss_ctx_id_t /*context_handle*/,
  770. gss_buffer_t /*input_message_buffer*/,
  771. gss_buffer_t /*output_message_buffer*/,
  772. int * /*conf_state*/,
  773. int * /*qop_state*/
  774. ) GSSAPI_DEPRECATED_FUNCTION("Use gss_unwrap");
  775. /**
  776. *
  777. */
  778. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  779. gss_encapsulate_token(gss_const_buffer_t /* input_token */,
  780. gss_const_OID /* oid */,
  781. gss_buffer_t /* output_token */);
  782. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  783. gss_decapsulate_token(gss_const_buffer_t /* input_token */,
  784. gss_const_OID /* oid */,
  785. gss_buffer_t /* output_token */);
  786. /*
  787. * AEAD support
  788. */
  789. /*
  790. * GSS_IOV
  791. */
  792. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  793. gss_wrap_iov(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t, int *,
  794. gss_iov_buffer_desc *, int);
  795. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  796. gss_unwrap_iov(OM_uint32 *, gss_ctx_id_t, int *, gss_qop_t *,
  797. gss_iov_buffer_desc *, int);
  798. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  799. gss_wrap_iov_length(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t, int *,
  800. gss_iov_buffer_desc *, int);
  801. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  802. gss_release_iov_buffer(OM_uint32 *, gss_iov_buffer_desc *, int);
  803. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  804. gss_export_cred(OM_uint32 * /* minor_status */,
  805. gss_cred_id_t /* cred_handle */,
  806. gss_buffer_t /* cred_token */);
  807. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  808. gss_import_cred(OM_uint32 * /* minor_status */,
  809. gss_buffer_t /* cred_token */,
  810. gss_cred_id_t * /* cred_handle */);
  811. /*
  812. * mech option
  813. */
  814. GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL
  815. gss_mo_set(gss_const_OID mech, gss_const_OID option,
  816. int enable, gss_buffer_t value);
  817. GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL
  818. gss_mo_get(gss_const_OID mech, gss_const_OID option, gss_buffer_t value);
  819. GSSAPI_LIB_FUNCTION void GSSAPI_LIB_CALL
  820. gss_mo_list(gss_const_OID mech, gss_OID_set *options);
  821. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  822. gss_mo_name(gss_const_OID mech, gss_const_OID options, gss_buffer_t name);
  823. /*
  824. * SASL glue functions and mech inquire
  825. */
  826. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  827. gss_inquire_saslname_for_mech(OM_uint32 *minor_status,
  828. const gss_OID desired_mech,
  829. gss_buffer_t sasl_mech_name,
  830. gss_buffer_t mech_name,
  831. gss_buffer_t mech_description);
  832. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  833. gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
  834. const gss_buffer_t sasl_mech_name,
  835. gss_OID *mech_type);
  836. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  837. gss_indicate_mechs_by_attrs(OM_uint32 * minor_status,
  838. gss_const_OID_set desired_mech_attrs,
  839. gss_const_OID_set except_mech_attrs,
  840. gss_const_OID_set critical_mech_attrs,
  841. gss_OID_set *mechs);
  842. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  843. gss_inquire_attrs_for_mech(OM_uint32 * minor_status,
  844. gss_const_OID mech,
  845. gss_OID_set *mech_attr,
  846. gss_OID_set *known_mech_attrs);
  847. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  848. gss_display_mech_attr(OM_uint32 * minor_status,
  849. gss_const_OID mech_attr,
  850. gss_buffer_t name,
  851. gss_buffer_t short_desc,
  852. gss_buffer_t long_desc);
  853. /*
  854. * Solaris compat
  855. */
  856. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_acquire_cred_with_password
  857. (OM_uint32 * /*minor_status*/,
  858. const gss_name_t /*desired_name*/,
  859. const gss_buffer_t /*password*/,
  860. OM_uint32 /*time_req*/,
  861. const gss_OID_set /*desired_mechs*/,
  862. gss_cred_usage_t /*cred_usage*/,
  863. gss_cred_id_t * /*output_cred_handle*/,
  864. gss_OID_set * /*actual_mechs*/,
  865. OM_uint32 * /*time_rec*/
  866. );
  867. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_cred_with_password (
  868. OM_uint32 * /*minor_status*/,
  869. const gss_cred_id_t /*input_cred_handle*/,
  870. const gss_name_t /*desired_name*/,
  871. const gss_OID /*desired_mech*/,
  872. const gss_buffer_t /*password*/,
  873. gss_cred_usage_t /*cred_usage*/,
  874. OM_uint32 /*initiator_time_req*/,
  875. OM_uint32 /*acceptor_time_req*/,
  876. gss_cred_id_t * /*output_cred_handle*/,
  877. gss_OID_set * /*actual_mechs*/,
  878. OM_uint32 * /*initiator_time_rec*/,
  879. OM_uint32 * /*acceptor_time_rec*/
  880. );
  881. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  882. gss_pname_to_uid(
  883. OM_uint32 *minor,
  884. const gss_name_t name,
  885. const gss_OID mech_type,
  886. uid_t *uidOut);
  887. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
  888. gss_authorize_localname(
  889. OM_uint32 *minor,
  890. const gss_name_t name,
  891. const gss_name_t user);
  892. GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL
  893. gss_userok(const gss_name_t name,
  894. const char *user);
  895. extern GSSAPI_LIB_VARIABLE gss_buffer_desc __gss_c_attr_local_login_user;
  896. #define GSS_C_ATTR_LOCAL_LOGIN_USER (&__gss_c_attr_local_login_user)
  897. /*
  898. * Naming extensions
  899. */
  900. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_name_ext (
  901. OM_uint32 *, /* minor_status */
  902. gss_name_t, /* name */
  903. gss_OID, /* display_as_name_type */
  904. gss_buffer_t /* display_name */
  905. );
  906. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_name (
  907. OM_uint32 *, /* minor_status */
  908. gss_name_t, /* name */
  909. int *, /* name_is_MN */
  910. gss_OID *, /* MN_mech */
  911. gss_buffer_set_t * /* attrs */
  912. );
  913. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_get_name_attribute (
  914. OM_uint32 *, /* minor_status */
  915. gss_name_t, /* name */
  916. gss_buffer_t, /* attr */
  917. int *, /* authenticated */
  918. int *, /* complete */
  919. gss_buffer_t, /* value */
  920. gss_buffer_t, /* display_value */
  921. int * /* more */
  922. );
  923. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_set_name_attribute (
  924. OM_uint32 *, /* minor_status */
  925. gss_name_t, /* name */
  926. int, /* complete */
  927. gss_buffer_t, /* attr */
  928. gss_buffer_t /* value */
  929. );
  930. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_delete_name_attribute (
  931. OM_uint32 *, /* minor_status */
  932. gss_name_t, /* name */
  933. gss_buffer_t /* attr */
  934. );
  935. GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_name_composite (
  936. OM_uint32 *, /* minor_status */
  937. gss_name_t, /* name */
  938. gss_buffer_t /* exp_composite_name */
  939. );
  940. /*
  941. *
  942. */
  943. GSSAPI_LIB_FUNCTION const char * GSSAPI_LIB_CALL
  944. gss_oid_to_name(gss_const_OID oid);
  945. GSSAPI_LIB_FUNCTION gss_OID GSSAPI_LIB_CALL
  946. gss_name_to_oid(const char *name);
  947. GSSAPI_CPP_END
  948. #if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
  949. #pragma pack(pop)
  950. #endif
  951. #undef GSSAPI_DEPRECATED_FUNCTION
  952. #endif /* GSSAPI_GSSAPI_H_ */