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
5c213e29
Unverified
Commit
5c213e29
authored
Nov 18, 2018
by
Edward Thomson
Committed by
GitHub
Nov 18, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4875 from tiennou/fix/openssl-errors
Some OpenSSL issues
parents
0310749b
03994912
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/streams/openssl.c
+7
-7
No files found.
src/streams/openssl.c
View file @
5c213e29
...
...
@@ -373,10 +373,10 @@ static int ssl_set_error(SSL *ssl, int error)
switch
(
err
)
{
case
SSL_ERROR_WANT_CONNECT
:
case
SSL_ERROR_WANT_ACCEPT
:
giterr_set
(
GITERR_
NET
,
"SSL error: connection failure"
);
giterr_set
(
GITERR_
SSL
,
"SSL error: connection failure"
);
break
;
case
SSL_ERROR_WANT_X509_LOOKUP
:
giterr_set
(
GITERR_
NET
,
"SSL error: x509 error"
);
giterr_set
(
GITERR_
SSL
,
"SSL error: x509 error"
);
break
;
case
SSL_ERROR_SYSCALL
:
e
=
ERR_get_error
();
...
...
@@ -389,7 +389,7 @@ static int ssl_set_error(SSL *ssl, int error)
giterr_set
(
GITERR_OS
,
"SSL error: syscall failure"
);
break
;
}
giterr_set
(
GITERR_
NET
,
"SSL error: received early EOF"
);
giterr_set
(
GITERR_
SSL
,
"SSL error: received early EOF"
);
return
GIT_EEOF
;
break
;
case
SSL_ERROR_SSL
:
...
...
@@ -397,13 +397,13 @@ static int ssl_set_error(SSL *ssl, int error)
char
errmsg
[
256
];
e
=
ERR_get_error
();
ERR_error_string_n
(
e
,
errmsg
,
sizeof
(
errmsg
));
giterr_set
(
GITERR_
NET
,
"SSL error: %s"
,
errmsg
);
giterr_set
(
GITERR_
SSL
,
"SSL error: %s"
,
errmsg
);
break
;
}
case
SSL_ERROR_NONE
:
case
SSL_ERROR_ZERO_RETURN
:
default:
giterr_set
(
GITERR_
NET
,
"SSL error: unknown error"
);
giterr_set
(
GITERR_
SSL
,
"SSL error: unknown error"
);
break
;
}
return
-
1
;
...
...
@@ -586,8 +586,6 @@ int openssl_connect(git_stream *stream)
if
((
ret
=
git_stream_connect
(
st
->
io
))
<
0
)
return
ret
;
st
->
connected
=
true
;
bio
=
BIO_new
(
git_stream_bio_method
);
GITERR_CHECK_ALLOC
(
bio
);
...
...
@@ -602,6 +600,8 @@ int openssl_connect(git_stream *stream)
if
((
ret
=
SSL_connect
(
st
->
ssl
))
<=
0
)
return
ssl_set_error
(
st
->
ssl
,
ret
);
st
->
connected
=
true
;
return
verify_server_cert
(
st
->
ssl
,
st
->
host
);
}
...
...
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