mirror of
https://github.com/reactos/reactos.git
synced 2025-05-31 15:08:14 +00:00
[WINHTTP]
- Sync to wine 1.3.21 svn path=/trunk/; revision=52105
This commit is contained in:
parent
e909d0b7db
commit
d7abc4fbf1
4 changed files with 39 additions and 36 deletions
|
@ -134,6 +134,7 @@ MAKE_FUNCPTR( ERR_free_strings );
|
||||||
MAKE_FUNCPTR( ERR_get_error );
|
MAKE_FUNCPTR( ERR_get_error );
|
||||||
MAKE_FUNCPTR( ERR_error_string );
|
MAKE_FUNCPTR( ERR_error_string );
|
||||||
MAKE_FUNCPTR( X509_STORE_CTX_get_ex_data );
|
MAKE_FUNCPTR( X509_STORE_CTX_get_ex_data );
|
||||||
|
MAKE_FUNCPTR( X509_STORE_CTX_get_chain );
|
||||||
MAKE_FUNCPTR( i2d_X509 );
|
MAKE_FUNCPTR( i2d_X509 );
|
||||||
MAKE_FUNCPTR( sk_value );
|
MAKE_FUNCPTR( sk_value );
|
||||||
MAKE_FUNCPTR( sk_num );
|
MAKE_FUNCPTR( sk_num );
|
||||||
|
@ -374,13 +375,14 @@ static int netconn_secure_verify( int preverify_ok, X509_STORE_CTX *ctx )
|
||||||
X509 *cert;
|
X509 *cert;
|
||||||
int i;
|
int i;
|
||||||
PCCERT_CONTEXT endCert = NULL;
|
PCCERT_CONTEXT endCert = NULL;
|
||||||
|
struct stack_st *chain = (struct stack_st *)pX509_STORE_CTX_get_chain( ctx );
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
for (i = 0; ret && i < psk_num((struct stack_st *)ctx->chain); i++)
|
for (i = 0; ret && i < psk_num(chain); i++)
|
||||||
{
|
{
|
||||||
PCCERT_CONTEXT context;
|
PCCERT_CONTEXT context;
|
||||||
|
|
||||||
cert = (X509 *)psk_value((struct stack_st *)ctx->chain, i);
|
cert = (X509 *)psk_value(chain, i);
|
||||||
if ((context = X509_to_cert_context( cert )))
|
if ((context = X509_to_cert_context( cert )))
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
@ -488,6 +490,7 @@ BOOL netconn_init( netconn_t *conn, BOOL secure )
|
||||||
LOAD_FUNCPTR( ERR_get_error );
|
LOAD_FUNCPTR( ERR_get_error );
|
||||||
LOAD_FUNCPTR( ERR_error_string );
|
LOAD_FUNCPTR( ERR_error_string );
|
||||||
LOAD_FUNCPTR( X509_STORE_CTX_get_ex_data );
|
LOAD_FUNCPTR( X509_STORE_CTX_get_ex_data );
|
||||||
|
LOAD_FUNCPTR( X509_STORE_CTX_get_chain );
|
||||||
LOAD_FUNCPTR( i2d_X509 );
|
LOAD_FUNCPTR( i2d_X509 );
|
||||||
LOAD_FUNCPTR( sk_value );
|
LOAD_FUNCPTR( sk_value );
|
||||||
LOAD_FUNCPTR( sk_num );
|
LOAD_FUNCPTR( sk_num );
|
||||||
|
|
|
@ -504,7 +504,7 @@ static WCHAR *build_request_path( request_t *request )
|
||||||
sprintfW( ret, fmt, scheme, request->connect->hostname );
|
sprintfW( ret, fmt, scheme, request->connect->hostname );
|
||||||
if (request->connect->hostport)
|
if (request->connect->hostport)
|
||||||
{
|
{
|
||||||
static const WCHAR colonFmt[] = { ':','%','d',0 };
|
static const WCHAR colonFmt[] = { ':','%','u',0 };
|
||||||
|
|
||||||
sprintfW( ret + strlenW( ret ), colonFmt,
|
sprintfW( ret + strlenW( ret ), colonFmt,
|
||||||
request->connect->hostport );
|
request->connect->hostport );
|
||||||
|
@ -870,7 +870,7 @@ static BOOL read_reply( request_t *request );
|
||||||
static BOOL secure_proxy_connect( request_t *request )
|
static BOOL secure_proxy_connect( request_t *request )
|
||||||
{
|
{
|
||||||
static const WCHAR verbConnect[] = {'C','O','N','N','E','C','T',0};
|
static const WCHAR verbConnect[] = {'C','O','N','N','E','C','T',0};
|
||||||
static const WCHAR fmt[] = {'%','s',':','%','d',0};
|
static const WCHAR fmt[] = {'%','s',':','%','u',0};
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
LPWSTR path;
|
LPWSTR path;
|
||||||
connect_t *connect = request->connect;
|
connect_t *connect = request->connect;
|
||||||
|
@ -1837,7 +1837,7 @@ static BOOL receive_response( request_t *request, BOOL async )
|
||||||
|
|
||||||
if (!(request->hdr.disable_flags & WINHTTP_DISABLE_COOKIES)) record_cookies( request );
|
if (!(request->hdr.disable_flags & WINHTTP_DISABLE_COOKIES)) record_cookies( request );
|
||||||
|
|
||||||
if (status == 301 || status == 302)
|
if (status == HTTP_STATUS_MOVED || status == HTTP_STATUS_REDIRECT || status == HTTP_STATUS_REDIRECT_KEEP_VERB)
|
||||||
{
|
{
|
||||||
if (request->hdr.disable_flags & WINHTTP_DISABLE_REDIRECTS) break;
|
if (request->hdr.disable_flags & WINHTTP_DISABLE_REDIRECTS) break;
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,7 @@ static DWORD comp_length( DWORD len, DWORD flags, WCHAR *comp )
|
||||||
|
|
||||||
static BOOL calc_length( URL_COMPONENTS *uc, DWORD flags, LPDWORD len )
|
static BOOL calc_length( URL_COMPONENTS *uc, DWORD flags, LPDWORD len )
|
||||||
{
|
{
|
||||||
static const WCHAR formatW[] = {'%','d',0};
|
static const WCHAR formatW[] = {'%','u',0};
|
||||||
INTERNET_SCHEME scheme;
|
INTERNET_SCHEME scheme;
|
||||||
|
|
||||||
*len = 0;
|
*len = 0;
|
||||||
|
@ -360,7 +360,7 @@ static BOOL calc_length( URL_COMPONENTS *uc, DWORD flags, LPDWORD len )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS uc, DWORD flags, LPWSTR url, LPDWORD required )
|
BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS uc, DWORD flags, LPWSTR url, LPDWORD required )
|
||||||
{
|
{
|
||||||
static const WCHAR formatW[] = {'%','d',0};
|
static const WCHAR formatW[] = {'%','u',0};
|
||||||
static const WCHAR twoslashW[] = {'/','/'};
|
static const WCHAR twoslashW[] = {'/','/'};
|
||||||
|
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
|
|
@ -204,38 +204,38 @@ typedef struct
|
||||||
LPDWORD written;
|
LPDWORD written;
|
||||||
} write_data_t;
|
} write_data_t;
|
||||||
|
|
||||||
object_header_t *addref_object( object_header_t * );
|
object_header_t *addref_object( object_header_t * ) DECLSPEC_HIDDEN;
|
||||||
object_header_t *grab_object( HINTERNET );
|
object_header_t *grab_object( HINTERNET ) DECLSPEC_HIDDEN;
|
||||||
void release_object( object_header_t * );
|
void release_object( object_header_t * ) DECLSPEC_HIDDEN;
|
||||||
HINTERNET alloc_handle( object_header_t * );
|
HINTERNET alloc_handle( object_header_t * ) DECLSPEC_HIDDEN;
|
||||||
BOOL free_handle( HINTERNET );
|
BOOL free_handle( HINTERNET ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
void set_last_error( DWORD );
|
void set_last_error( DWORD ) DECLSPEC_HIDDEN;
|
||||||
DWORD get_last_error( void );
|
DWORD get_last_error( void ) DECLSPEC_HIDDEN;
|
||||||
void send_callback( object_header_t *, DWORD, LPVOID, DWORD );
|
void send_callback( object_header_t *, DWORD, LPVOID, DWORD ) DECLSPEC_HIDDEN;
|
||||||
void close_connection( request_t * );
|
void close_connection( request_t * ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
BOOL netconn_close( netconn_t * );
|
BOOL netconn_close( netconn_t * ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_connect( netconn_t *, const struct sockaddr *, unsigned int, int );
|
BOOL netconn_connect( netconn_t *, const struct sockaddr *, unsigned int, int ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_connected( netconn_t * );
|
BOOL netconn_connected( netconn_t * ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_create( netconn_t *, int, int, int );
|
BOOL netconn_create( netconn_t *, int, int, int ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_get_next_line( netconn_t *, char *, DWORD * );
|
BOOL netconn_get_next_line( netconn_t *, char *, DWORD * ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_init( netconn_t *, BOOL );
|
BOOL netconn_init( netconn_t *, BOOL ) DECLSPEC_HIDDEN;
|
||||||
void netconn_unload( void );
|
void netconn_unload( void ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_query_data_available( netconn_t *, DWORD * );
|
BOOL netconn_query_data_available( netconn_t *, DWORD * ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_recv( netconn_t *, void *, size_t, int, int * );
|
BOOL netconn_recv( netconn_t *, void *, size_t, int, int * ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr *, socklen_t *, int );
|
BOOL netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr *, socklen_t *, int ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_secure_connect( netconn_t *, WCHAR * );
|
BOOL netconn_secure_connect( netconn_t *, WCHAR * ) DECLSPEC_HIDDEN;
|
||||||
BOOL netconn_send( netconn_t *, const void *, size_t, int, int * );
|
BOOL netconn_send( netconn_t *, const void *, size_t, int, int * ) DECLSPEC_HIDDEN;
|
||||||
DWORD netconn_set_timeout( netconn_t *, BOOL, int );
|
DWORD netconn_set_timeout( netconn_t *, BOOL, int ) DECLSPEC_HIDDEN;
|
||||||
const void *netconn_get_certificate( netconn_t * );
|
const void *netconn_get_certificate( netconn_t * ) DECLSPEC_HIDDEN;
|
||||||
int netconn_get_cipher_strength( netconn_t * );
|
int netconn_get_cipher_strength( netconn_t * ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
BOOL set_cookies( request_t *, const WCHAR * );
|
BOOL set_cookies( request_t *, const WCHAR * ) DECLSPEC_HIDDEN;
|
||||||
BOOL add_cookie_headers( request_t * );
|
BOOL add_cookie_headers( request_t * ) DECLSPEC_HIDDEN;
|
||||||
BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD );
|
BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD ) DECLSPEC_HIDDEN;
|
||||||
void delete_domain( domain_t * );
|
void delete_domain( domain_t * ) DECLSPEC_HIDDEN;
|
||||||
BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port );
|
BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
static inline void *heap_alloc( SIZE_T size )
|
static inline void *heap_alloc( SIZE_T size )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue