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
caee0a66
Commit
caee0a66
authored
Aug 29, 2018
by
Etienne Samson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
openssl: set the error class to GITERR_SSL
parent
b5ae83bf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/streams/openssl.c
+5
-5
No files found.
src/streams/openssl.c
View file @
caee0a66
...
@@ -373,10 +373,10 @@ static int ssl_set_error(SSL *ssl, int error)
...
@@ -373,10 +373,10 @@ static int ssl_set_error(SSL *ssl, int error)
switch
(
err
)
{
switch
(
err
)
{
case
SSL_ERROR_WANT_CONNECT
:
case
SSL_ERROR_WANT_CONNECT
:
case
SSL_ERROR_WANT_ACCEPT
:
case
SSL_ERROR_WANT_ACCEPT
:
giterr_set
(
GITERR_
NET
,
"SSL error: connection failure"
);
giterr_set
(
GITERR_
SSL
,
"SSL error: connection failure"
);
break
;
break
;
case
SSL_ERROR_WANT_X509_LOOKUP
:
case
SSL_ERROR_WANT_X509_LOOKUP
:
giterr_set
(
GITERR_
NET
,
"SSL error: x509 error"
);
giterr_set
(
GITERR_
SSL
,
"SSL error: x509 error"
);
break
;
break
;
case
SSL_ERROR_SYSCALL
:
case
SSL_ERROR_SYSCALL
:
e
=
ERR_get_error
();
e
=
ERR_get_error
();
...
@@ -389,7 +389,7 @@ static int ssl_set_error(SSL *ssl, int error)
...
@@ -389,7 +389,7 @@ static int ssl_set_error(SSL *ssl, int error)
giterr_set
(
GITERR_OS
,
"SSL error: syscall failure"
);
giterr_set
(
GITERR_OS
,
"SSL error: syscall failure"
);
break
;
break
;
}
}
giterr_set
(
GITERR_
NET
,
"SSL error: received early EOF"
);
giterr_set
(
GITERR_
SSL
,
"SSL error: received early EOF"
);
return
GIT_EEOF
;
return
GIT_EEOF
;
break
;
break
;
case
SSL_ERROR_SSL
:
case
SSL_ERROR_SSL
:
...
@@ -397,13 +397,13 @@ static int ssl_set_error(SSL *ssl, int error)
...
@@ -397,13 +397,13 @@ static int ssl_set_error(SSL *ssl, int error)
char
errmsg
[
256
];
char
errmsg
[
256
];
e
=
ERR_get_error
();
e
=
ERR_get_error
();
ERR_error_string_n
(
e
,
errmsg
,
sizeof
(
errmsg
));
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
;
break
;
}
}
case
SSL_ERROR_NONE
:
case
SSL_ERROR_NONE
:
case
SSL_ERROR_ZERO_RETURN
:
case
SSL_ERROR_ZERO_RETURN
:
default:
default:
giterr_set
(
GITERR_
NET
,
"SSL error: unknown error"
);
giterr_set
(
GITERR_
SSL
,
"SSL error: unknown error"
);
break
;
break
;
}
}
return
-
1
;
return
-
1
;
...
...
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