Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
aabe1e5a
Commit
aabe1e5a
authored
Oct 26, 2014
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'csware/cleanup'
parents
b07db1eb
334a0696
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
src/transports/winhttp.c
+6
-8
No files found.
src/transports/winhttp.c
View file @
aabe1e5a
...
...
@@ -161,6 +161,9 @@ static int fallback_cred_acquire_cb(
{
int
error
=
1
;
GIT_UNUSED
(
username_from_url
);
GIT_UNUSED
(
payload
);
/* If the target URI supports integrated Windows authentication
* as an authentication mechanism */
if
(
GIT_CREDTYPE_DEFAULT
&
allowed_types
)
{
...
...
@@ -501,11 +504,12 @@ static int winhttp_connect(
wchar_t
*
ua
=
L"git/1.0 (libgit2 "
WIDEN
(
LIBGIT2_VERSION
)
L")"
;
wchar_t
*
wide_host
;
int32_t
port
;
const
char
*
default_port
=
"80"
;
int
error
=
-
1
;
int
default_timeout
=
TIMEOUT_INFINITE
;
int
default_connect_timeout
=
DEFAULT_CONNECT_TIMEOUT
;
GIT_UNUSED
(
url
);
/* Prepare port */
if
(
git__strtol32
(
&
port
,
t
->
connection_data
.
port
,
NULL
,
10
)
<
0
)
return
-
1
;
...
...
@@ -557,8 +561,6 @@ on_error:
static
int
do_send_request
(
winhttp_stream
*
s
,
size_t
len
,
int
ignore_length
)
{
int
request_failed
=
0
,
cert_valid
=
1
,
error
=
0
;
if
(
ignore_length
)
{
if
(
!
WinHttpSendRequest
(
s
->
request
,
WINHTTP_NO_ADDITIONAL_HEADERS
,
0
,
...
...
@@ -607,10 +609,7 @@ static int send_request(winhttp_stream *s, size_t len, int ignore_length)
if
(
!
request_failed
)
return
0
;
ignore_flags
=
SECURITY_FLAG_IGNORE_CERT_CN_INVALID
|
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID
|
SECURITY_FLAG_IGNORE_UNKNOWN_CA
;
ignore_flags
=
no_check_cert_flags
;
if
(
!
WinHttpSetOption
(
s
->
request
,
WINHTTP_OPTION_SECURITY_FLAGS
,
&
ignore_flags
,
sizeof
(
ignore_flags
)))
{
giterr_set
(
GITERR_OS
,
"failed to set security options"
);
...
...
@@ -650,7 +649,6 @@ replay:
DWORD
status_code
,
status_code_length
,
content_type_length
,
bytes_written
;
char
expected_content_type_8
[
MAX_CONTENT_TYPE_LEN
];
wchar_t
expected_content_type
[
MAX_CONTENT_TYPE_LEN
],
content_type
[
MAX_CONTENT_TYPE_LEN
];
int
request_failed
=
0
,
cert_valid
=
1
;
if
(
!
s
->
sent_request
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment