2
0

curl_gssapi.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef HEADER_CURL_GSSAPI_H
  2. #define HEADER_CURL_GSSAPI_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 2011 - 2019, Daniel Stenberg, <daniel@haxx.se>, 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.haxx.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. ***************************************************************************/
  24. #include "curl_setup.h"
  25. #include "urldata.h"
  26. #ifdef HAVE_GSSAPI
  27. extern gss_OID_desc Curl_spnego_mech_oid;
  28. extern gss_OID_desc Curl_krb5_mech_oid;
  29. /* Common method for using GSS-API */
  30. OM_uint32 Curl_gss_init_sec_context(
  31. struct Curl_easy *data,
  32. OM_uint32 *minor_status,
  33. gss_ctx_id_t *context,
  34. gss_name_t target_name,
  35. gss_OID mech_type,
  36. gss_channel_bindings_t input_chan_bindings,
  37. gss_buffer_t input_token,
  38. gss_buffer_t output_token,
  39. const bool mutual_auth,
  40. OM_uint32 *ret_flags);
  41. /* Helper to log a GSS-API error status */
  42. void Curl_gss_log_error(struct Curl_easy *data, const char *prefix,
  43. OM_uint32 major, OM_uint32 minor);
  44. /* Provide some definitions missing in old headers */
  45. #ifdef HAVE_OLD_GSSMIT
  46. #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
  47. #define NCOMPAT 1
  48. #endif
  49. /* Define our privacy and integrity protection values */
  50. #define GSSAUTH_P_NONE 1
  51. #define GSSAUTH_P_INTEGRITY 2
  52. #define GSSAUTH_P_PRIVACY 4
  53. #endif /* HAVE_GSSAPI */
  54. #endif /* HEADER_CURL_GSSAPI_H */