Git init
[external/curl.git] / lib / curl_sspi.h
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  ***************************************************************************/
24
25 #include "setup.h"
26
27 #ifdef USE_WINDOWS_SSPI
28
29 #include <curl/curl.h>
30
31 /*
32  * When including the folowing three headers, it is mandatory to define either
33  * SECURITY_WIN32 or SECURITY_KERNEL, indicating who is compiling the code.
34  */
35
36 #undef SECURITY_WIN32
37 #undef SECURITY_KERNEL
38 #define SECURITY_WIN32 1
39 #include <security.h>
40 #include <sspi.h>
41 #include <rpc.h>
42
43 /* Provide some definitions missing in MinGW's headers */
44
45 #ifndef SEC_I_CONTEXT_EXPIRED
46 # define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L)
47 #endif
48 #ifndef SEC_E_BUFFER_TOO_SMALL
49 # define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L)
50 #endif
51 #ifndef SEC_E_CONTEXT_EXPIRED
52 # define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L)
53 #endif
54 #ifndef SEC_E_CRYPTO_SYSTEM_INVALID
55 # define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L)
56 #endif
57 #ifndef SEC_E_MESSAGE_ALTERED
58 # define SEC_E_MESSAGE_ALTERED ((HRESULT)0x8009030FL)
59 #endif
60 #ifndef SEC_E_OUT_OF_SEQUENCE
61 # define SEC_E_OUT_OF_SEQUENCE ((HRESULT)0x80090310L)
62 #endif
63
64 CURLcode Curl_sspi_global_init(void);
65 void Curl_sspi_global_cleanup(void);
66
67 /* Forward-declaration of global variables defined in curl_sspi.c */
68
69 extern HMODULE s_hSecDll;
70 extern PSecurityFunctionTableA s_pSecFn;
71
72 #endif /* USE_WINDOWS_SSPI */
73 #endif /* HEADER_CURL_SSPI_H */