curl_gssapi.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef HEADER_CURL_GSSAPI_H
  2. #define HEADER_CURL_GSSAPI_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) Daniel Stenberg, <[email protected]>, et al.
  11. *
  12. * This software is licensed as described in the file COPYING, which
  13. * you should have received as part of this distribution. The terms
  14. * are also available at https://curl.se/docs/copyright.html.
  15. *
  16. * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  17. * copies of the Software, and permit persons to whom the Software is
  18. * furnished to do so, under the terms of the COPYING file.
  19. *
  20. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  21. * KIND, either express or implied.
  22. *
  23. * SPDX-License-Identifier: curl
  24. *
  25. ***************************************************************************/
  26. #include "curl_setup.h"
  27. #include "urldata.h"
  28. #ifdef HAVE_GSSAPI
  29. #ifdef GSS_C_CHANNEL_BOUND_FLAG /* MIT Kerberos 1.19+, missing from GNU GSS */
  30. #define CURL_GSSAPI_HAS_CHANNEL_BINDING
  31. #endif
  32. extern gss_OID_desc Curl_spnego_mech_oid;
  33. extern gss_OID_desc Curl_krb5_mech_oid;
  34. /* Common method for using GSS-API */
  35. OM_uint32 Curl_gss_init_sec_context(struct Curl_easy *data,
  36. OM_uint32 *minor_status,
  37. gss_ctx_id_t *context,
  38. gss_name_t target_name,
  39. gss_OID mech_type,
  40. gss_channel_bindings_t input_chan_bindings,
  41. gss_buffer_t input_token,
  42. gss_buffer_t output_token,
  43. const bool mutual_auth,
  44. OM_uint32 *ret_flags);
  45. OM_uint32 Curl_gss_delete_sec_context(OM_uint32 *min,
  46. gss_ctx_id_t *context_handle,
  47. gss_buffer_t output_token);
  48. /* Helper to log a GSS-API error status */
  49. void Curl_gss_log_error(struct Curl_easy *data, const char *prefix,
  50. OM_uint32 major, OM_uint32 minor);
  51. /* Define our privacy and integrity protection values */
  52. #define GSSAUTH_P_NONE 1
  53. #define GSSAUTH_P_INTEGRITY 2
  54. #define GSSAUTH_P_PRIVACY 4
  55. #endif /* HAVE_GSSAPI */
  56. #endif /* HEADER_CURL_GSSAPI_H */