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
f537670c
Commit
f537670c
authored
May 13, 2014
by
Daniel O'Connell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Synced net skeleton
parent
4cb3341a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
mongoose.c
mongoose.c
+4
-6
No files found.
mongoose.c
View file @
f537670c
...
...
@@ -574,7 +574,6 @@ static sock_t ns_open_listening_socket(union socket_address *sa) {
// openssl x509 -req -in client.req -CA ca.pem -CAkey ca.pem -out client.crt
// cat client.key client.crt > client.pem
int
ns_set_ssl_ca_cert
(
struct
ns_server
*
server
,
const
char
*
cert
)
{
(
void
)
server
;
(
void
)
cert
;
#ifdef NS_ENABLE_SSL
STACK_OF
(
X509_NAME
)
*
list
=
SSL_load_client_CA_file
(
cert
);
if
(
cert
!=
NULL
&&
server
->
ssl_ctx
!=
NULL
&&
list
!=
NULL
)
{
...
...
@@ -584,7 +583,7 @@ int ns_set_ssl_ca_cert(struct ns_server *server, const char *cert) {
return
0
;
}
#endif
return
-
1
;
return
server
!=
NULL
&&
cert
==
NULL
?
0
:
-
1
;
}
int
ns_set_ssl_cert
(
struct
ns_server
*
server
,
const
char
*
cert
)
{
...
...
@@ -597,11 +596,10 @@ int ns_set_ssl_cert(struct ns_server *server, const char *cert) {
return
-
2
;
}
else
{
SSL_CTX_use_certificate_chain_file
(
server
->
ssl_ctx
,
cert
);
}
return
0
;
#else
return
server
!=
NULL
&&
cert
==
NULL
?
0
:
-
3
;
}
#endif
return
server
!=
NULL
&&
cert
==
NULL
?
0
:
-
3
;
}
int
ns_bind
(
struct
ns_server
*
server
,
const
char
*
str
)
{
...
...
@@ -874,7 +872,7 @@ int ns_server_poll(struct ns_server *server, int milli) {
}
}
// Read
possible wakeup call
s
// Read
wakeup message
s
if
(
server
->
ctl
[
1
]
!=
INVALID_SOCKET
&&
FD_ISSET
(
server
->
ctl
[
1
],
&
read_set
))
{
struct
ctl_msg
ctl_msg
;
...
...
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