Go to the documentation of this file.00001 #ifndef HEADER_CURL_SCHANNEL_H
00002 #define HEADER_CURL_SCHANNEL_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "curl_setup.h"
00026
00027 #ifdef USE_SCHANNEL
00028
00029 #include "urldata.h"
00030
00031 #ifndef UNISP_NAME_A
00032 #define UNISP_NAME_A "Microsoft Unified Security Protocol Provider"
00033 #endif
00034
00035 #ifndef UNISP_NAME_W
00036 #define UNISP_NAME_W L"Microsoft Unified Security Protocol Provider"
00037 #endif
00038
00039 #ifndef UNISP_NAME
00040 #ifdef UNICODE
00041 #define UNISP_NAME UNISP_NAME_W
00042 #else
00043 #define UNISP_NAME UNISP_NAME_A
00044 #endif
00045 #endif
00046
00047 #ifndef SP_PROT_SSL2_CLIENT
00048 #define SP_PROT_SSL2_CLIENT 0x00000008
00049 #endif
00050
00051 #ifndef SP_PROT_SSL3_CLIENT
00052 #define SP_PROT_SSL3_CLIENT 0x00000008
00053 #endif
00054
00055 #ifndef SP_PROT_TLS1_CLIENT
00056 #define SP_PROT_TLS1_CLIENT 0x00000080
00057 #endif
00058
00059 #ifndef SP_PROT_TLS1_0_CLIENT
00060 #define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT
00061 #endif
00062
00063 #ifndef SP_PROT_TLS1_1_CLIENT
00064 #define SP_PROT_TLS1_1_CLIENT 0x00000200
00065 #endif
00066
00067 #ifndef SP_PROT_TLS1_2_CLIENT
00068 #define SP_PROT_TLS1_2_CLIENT 0x00000800
00069 #endif
00070
00071 #ifndef SECBUFFER_ALERT
00072 #define SECBUFFER_ALERT 17
00073 #endif
00074
00075
00076 #define CURL_SCHANNEL_BUFFER_INIT_SIZE 4096
00077 #define CURL_SCHANNEL_BUFFER_FREE_SIZE 1024
00078
00079
00080 CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex);
00081
00082 CURLcode Curl_schannel_connect_nonblocking(struct connectdata *conn,
00083 int sockindex,
00084 bool *done);
00085
00086 bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex);
00087 void Curl_schannel_close(struct connectdata *conn, int sockindex);
00088 int Curl_schannel_shutdown(struct connectdata *conn, int sockindex);
00089 void Curl_schannel_session_free(void *ptr);
00090
00091 int Curl_schannel_init(void);
00092 void Curl_schannel_cleanup(void);
00093 size_t Curl_schannel_version(char *buffer, size_t size);
00094
00095 int Curl_schannel_random(unsigned char *entropy, size_t length);
00096
00097
00098 #define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL
00099
00100
00101 #define have_curlssl_certinfo 1
00102
00103
00104 #define curlssl_init Curl_schannel_init
00105 #define curlssl_cleanup Curl_schannel_cleanup
00106 #define curlssl_connect Curl_schannel_connect
00107 #define curlssl_connect_nonblocking Curl_schannel_connect_nonblocking
00108 #define curlssl_session_free Curl_schannel_session_free
00109 #define curlssl_close_all(x) ((void)x)
00110 #define curlssl_close Curl_schannel_close
00111 #define curlssl_shutdown Curl_schannel_shutdown
00112 #define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
00113 #define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
00114 #define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
00115 #define curlssl_version Curl_schannel_version
00116 #define curlssl_check_cxn(x) ((void)x, -1)
00117 #define curlssl_data_pending Curl_schannel_data_pending
00118 #define curlssl_random(x,y,z) ((void)x, Curl_schannel_random(y,z))
00119
00120 #endif
00121 #endif