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
e8ccdd6b
Commit
e8ccdd6b
authored
Sep 30, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3445 from libgit2/cmn/ssl-null
openssl: don't try to teardown an unconnected SSL context
parents
72b7c570
146a96de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
src/openssl_stream.c
+6
-1
No files found.
src/openssl_stream.c
View file @
e8ccdd6b
...
...
@@ -302,6 +302,7 @@ cert_fail_name:
typedef
struct
{
git_stream
parent
;
git_stream
*
io
;
bool
connected
;
char
*
host
;
SSL
*
ssl
;
git_cert_x509
cert_info
;
...
...
@@ -318,6 +319,8 @@ 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
);
bio
->
ptr
=
st
->
io
;
...
...
@@ -406,9 +409,11 @@ int openssl_close(git_stream *stream)
openssl_stream
*
st
=
(
openssl_stream
*
)
stream
;
int
ret
;
if
((
ret
=
ssl_teardown
(
st
->
ssl
))
<
0
)
if
(
st
->
connected
&&
(
ret
=
ssl_teardown
(
st
->
ssl
))
<
0
)
return
-
1
;
st
->
connected
=
false
;
return
git_stream_close
(
st
->
io
);
}
...
...
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