curl_sspi.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef HEADER_CURL_SSPI_H
  2. #define HEADER_CURL_SSPI_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 1998 - 2010, 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 http://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. * $Id$
  24. ***************************************************************************/
  25. #include "setup.h"
  26. #ifdef USE_WINDOWS_SSPI
  27. #include <curl/curl.h>
  28. /*
  29. * When including the folowing three headers, it is mandatory to define either
  30. * SECURITY_WIN32 or SECURITY_KERNEL, indicating who is compiling the code.
  31. */
  32. #undef SECURITY_WIN32
  33. #undef SECURITY_KERNEL
  34. #define SECURITY_WIN32 1
  35. #include <security.h>
  36. #include <sspi.h>
  37. #include <rpc.h>
  38. /* Provide some definitions missing in MinGW's headers */
  39. #ifndef SEC_I_CONTEXT_EXPIRED
  40. # define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L)
  41. #endif
  42. #ifndef SEC_E_BUFFER_TOO_SMALL
  43. # define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L)
  44. #endif
  45. #ifndef SEC_E_CONTEXT_EXPIRED
  46. # define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L)
  47. #endif
  48. #ifndef SEC_E_CRYPTO_SYSTEM_INVALID
  49. # define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L)
  50. #endif
  51. #ifndef SEC_E_MESSAGE_ALTERED
  52. # define SEC_E_MESSAGE_ALTERED ((HRESULT)0x8009030FL)
  53. #endif
  54. #ifndef SEC_E_OUT_OF_SEQUENCE
  55. # define SEC_E_OUT_OF_SEQUENCE ((HRESULT)0x80090310L)
  56. #endif
  57. CURLcode Curl_sspi_global_init(void);
  58. void Curl_sspi_global_cleanup(void);
  59. /* Forward-declaration of global variables defined in curl_sspi.c */
  60. extern HMODULE s_hSecDll;
  61. extern PSecurityFunctionTableA s_pSecFn;
  62. #endif /* USE_WINDOWS_SSPI */
  63. #endif /* HEADER_CURL_SSPI_H */