Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mongoose
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
10872b32
Commit
10872b32
authored
11 years ago
by
Sergey Lyubka
Browse files
Options
Downloads
Patches
Plain Diff
Inlined openssl definitions instead of including a header - preparing for ssl amalgamation
parent
cb324cfb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mongoose.c
+19
-2
19 additions, 2 deletions
mongoose.c
with
19 additions
and
2 deletions
mongoose.c
+
19
−
2
View file @
10872b32
...
@@ -115,7 +115,25 @@ typedef struct stat file_stat_t;
...
@@ -115,7 +115,25 @@ typedef struct stat file_stat_t;
#ifdef USE_SSL
#ifdef USE_SSL
// Following define gets rid of openssl deprecation messages
// Following define gets rid of openssl deprecation messages
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
#include
<openssl/ssl.h>
typedef
struct
ssl_ctx_st
SSL_CTX
;
typedef
struct
ssl_st
SSL
;
typedef
struct
ssl_method_st
SSL_METHOD
;
extern
void
SSL_free
(
SSL
*
);
extern
int
SSL_accept
(
SSL
*
);
extern
int
SSL_connect
(
SSL
*
);
extern
int
SSL_read
(
SSL
*
,
void
*
,
int
);
extern
int
SSL_write
(
SSL
*
,
const
void
*
,
int
);
extern
int
SSL_set_fd
(
SSL
*
,
int
);
extern
SSL
*
SSL_new
(
SSL_CTX
*
);
extern
SSL_CTX
*
SSL_CTX_new
(
SSL_METHOD
*
);
extern
SSL_METHOD
*
SSLv23_server_method
(
void
);
extern
int
SSL_library_init
(
void
);
extern
int
SSL_CTX_use_PrivateKey_file
(
SSL_CTX
*
,
const
char
*
,
int
);
extern
int
SSL_CTX_use_certificate_file
(
SSL_CTX
*
,
const
char
*
,
int
);
extern
int
SSL_CTX_use_certificate_chain_file
(
SSL_CTX
*
,
const
char
*
);
extern
void
SSL_CTX_free
(
SSL_CTX
*
);
#endif
#endif
#include
"mongoose.h"
#include
"mongoose.h"
...
@@ -3620,7 +3638,6 @@ const char *mg_set_option(struct mg_server *server, const char *name,
...
@@ -3620,7 +3638,6 @@ const char *mg_set_option(struct mg_server *server, const char *name,
}
else
if
(
ind
==
SSL_CERTIFICATE
)
{
}
else
if
(
ind
==
SSL_CERTIFICATE
)
{
#ifdef USE_SSL
#ifdef USE_SSL
SSL_library_init
();
SSL_library_init
();
//SSL_load_error_strings();
if
((
server
->
ssl_ctx
=
SSL_CTX_new
(
SSLv23_server_method
()))
==
NULL
)
{
if
((
server
->
ssl_ctx
=
SSL_CTX_new
(
SSLv23_server_method
()))
==
NULL
)
{
error_msg
=
"SSL_CTX_new() failed"
;
error_msg
=
"SSL_CTX_new() failed"
;
}
else
if
(
SSL_CTX_use_certificate_file
(
server
->
ssl_ctx
,
value
,
1
)
==
0
||
}
else
if
(
SSL_CTX_use_certificate_file
(
server
->
ssl_ctx
,
value
,
1
)
==
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