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
e389e70d
Commit
e389e70d
authored
Aug 20, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
squashed warn in mg_terminate_ssl()
parent
695559f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mongoose.c
mongoose.c
+2
-2
No files found.
mongoose.c
View file @
e389e70d
...
...
@@ -4148,7 +4148,6 @@ static void proxy_request(struct ns_connection *pc, struct mg_connection *c) {
int
mg_terminate_ssl
(
struct
mg_connection
*
c
,
const
char
*
cert
)
{
static
const
char
ok
[]
=
"HTTP/1.0 200 OK
\r\n\r\n
"
;
struct
connection
*
conn
=
MG_CONN_2_CONN
(
c
);
int
n
;
SSL_CTX
*
ctx
;
DBG
((
"%p MITM"
,
conn
));
...
...
@@ -4160,7 +4159,8 @@ int mg_terminate_ssl(struct mg_connection *c, const char *cert) {
SSL_CTX_use_certificate_chain_file
(
ctx
,
cert
);
// When clear-text reply is pushed to client, switch to SSL mode.
n
=
send
(
conn
->
ns_conn
->
sock
,
ok
,
sizeof
(
ok
)
-
1
,
0
);
// TODO(lsm): check for send() failure
send
(
conn
->
ns_conn
->
sock
,
ok
,
sizeof
(
ok
)
-
1
,
0
);
DBG
((
"%p %lu %d SEND"
,
c
,
(
unsigned
long
)
sizeof
(
ok
)
-
1
,
n
));
conn
->
ns_conn
->
send_iobuf
.
len
=
0
;
conn
->
endpoint_type
=
EP_USER
;
// To keep-alive in close_local_endpoint()
...
...
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