Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libwebsockets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Fork
libwebsockets
Commits
0c512390
Commit
0c512390
authored
10 years ago
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
ssl clean recent external CTX patch so doesnt break build
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
4d9c8fc0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/context.c
+3
-12
3 additions, 12 deletions
lib/context.c
lib/ssl-http2.c
+2
-0
2 additions, 0 deletions
lib/ssl-http2.c
lib/ssl.c
+8
-0
8 additions, 0 deletions
lib/ssl.c
with
13 additions
and
12 deletions
lib/context.c
+
3
−
12
View file @
0c512390
...
@@ -214,24 +214,15 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
...
@@ -214,24 +214,15 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
sizeof
(
struct
libwebsocket
),
sizeof
(
struct
libwebsocket
),
sizeof
(
struct
allocated_headers
));
sizeof
(
struct
allocated_headers
));
if
(
lws_context_init_server_ssl
(
info
,
context
))
#ifdef LWS_OPENSSL_SUPPORT
if
(
info
->
provided_client_ssl_ctx
){
//use the provided OpenSSL context if given one
context
->
ssl_client_ctx
=
info
->
provided_client_ssl_ctx
;
context
->
user_supplied_ssl_ctx
=
1
;
//mark to not delet the context on cleanup
}
#endif
if
(
lws_context_init_server_ssl
(
info
,
context
))
goto
bail
;
goto
bail
;
if
(
!
context
->
ssl_client_ctx
&&
lws_context_init_client_ssl
(
info
,
context
))
if
(
lws_context_init_client_ssl
(
info
,
context
))
goto
bail
;
goto
bail
;
if
(
lws_context_init_server
(
info
,
context
))
if
(
lws_context_init_server
(
info
,
context
))
goto
bail
;
goto
bail
;
lwsl_debug
(
" client SSL ctx %p
\n
"
,
context
->
ssl_client_ctx
);
lwsl_debug
(
" server SSL ctx %p
\n
"
,
context
->
ssl_ctx
);
/*
/*
* drop any root privs for this process
* drop any root privs for this process
* to listen on port < 1023 we would have needed root, but now we are
* to listen on port < 1023 we would have needed root, but now we are
...
...
This diff is collapsed.
Click to expand it.
lib/ssl-http2.c
+
2
−
0
View file @
0c512390
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
#include
"private-libwebsockets.h"
#include
"private-libwebsockets.h"
#ifndef LWS_NO_SERVER
#ifndef LWS_NO_SERVER
#ifdef LWS_OPENSSL_SUPPORT
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
static
int
alpn_select_proto_cb
(
SSL
*
ssl
,
static
int
alpn_select_proto_cb
(
SSL
*
ssl
,
...
@@ -75,4 +76,5 @@ lws_context_init_http2_ssl(struct libwebsocket_context *context)
...
@@ -75,4 +76,5 @@ lws_context_init_http2_ssl(struct libwebsocket_context *context)
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
}
}
#endif
#endif
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lib/ssl.c
+
8
−
0
View file @
0c512390
...
@@ -238,6 +238,14 @@ int lws_context_init_client_ssl(struct lws_context_creation_info *info,
...
@@ -238,6 +238,14 @@ int lws_context_init_client_ssl(struct lws_context_creation_info *info,
int
n
;
int
n
;
SSL_METHOD
*
method
;
SSL_METHOD
*
method
;
if
(
info
->
provided_client_ssl_ctx
)
{
/* use the provided OpenSSL context if given one */
context
->
ssl_client_ctx
=
info
->
provided_client_ssl_ctx
;
/* nothing for lib to delete */
context
->
user_supplied_ssl_ctx
=
1
;
return
0
;
}
if
(
info
->
port
!=
CONTEXT_PORT_NO_LISTEN
)
if
(
info
->
port
!=
CONTEXT_PORT_NO_LISTEN
)
return
0
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment