Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
6c4d37ee
Commit
6c4d37ee
authored
9 years ago
by
Deomid Ryabkov
Committed by
Marko Mikulicic
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Free previous ssl context in mg_set_ssl
PUBLISHED_FROM=9f595222bce1fe8d0917649e36ce3be40eee1775
parent
97b79cd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
mongoose.c
mongoose.c
+9
-0
No files found.
mongoose.c
View file @
6c4d37ee
...
...
@@ -2387,6 +2387,15 @@ const char *mg_set_ssl(struct mg_connection *nc, const char *cert,
const
char
*
result
=
NULL
;
DBG
((
"%p %s %s"
,
nc
,
(
cert
?
cert
:
""
),
(
ca_cert
?
ca_cert
:
""
)));
if
(
nc
->
ssl
!=
NULL
)
{
SSL_free
(
nc
->
ssl
);
nc
->
ssl
=
NULL
;
}
if
(
nc
->
ssl_ctx
!=
NULL
)
{
SSL_CTX_free
(
nc
->
ssl_ctx
);
nc
->
ssl_ctx
=
NULL
;
}
if
((
nc
->
flags
&
MG_F_LISTENING
)
&&
(
nc
->
ssl_ctx
=
SSL_CTX_new
(
SSLv23_server_method
()))
==
NULL
)
{
result
=
"SSL_CTX_new() failed"
;
...
...
This diff is collapsed.
Click to expand it.
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