1
0
mirror of https://github.com/lammertb/libhttp.git synced 2026-01-03 16:02:30 +03:00

Add a define SSL_ALREADY_INITIALIZED

This define should be set if civetweb is embeded into a host application
that did already set up SSL (libcrypto).
See also comment "cryptolib_users = 1", issue #58
This commit is contained in:
bel2125
2015-01-07 23:16:35 +01:00
parent 5e9859510b
commit b6088ee7eb
3 changed files with 10 additions and 1 deletions

View File

@@ -98,6 +98,7 @@ make build COPT="-DNDEBUG -DNO_CGI"
| NO_SSL_DL | link against system libssl library |
| NO_FILES | do not serve files from a directory |
| SQLITE_DISABLE_LFS | disables large files (Lua only) |
| SSL_ALREADY_INITIALIZED | do not initialize libcrypto |
## Cross Compiling

View File

@@ -125,6 +125,10 @@ two threads: a master thread, that accepts new connections, and several
worker threads, that process accepted connections. The number of worker threads
is configurable via `num_threads` configuration option. That number puts a
limit on number of simultaneous requests that can be handled by civetweb.
If you embed civetweb into a program that uses SSL outside civetweb as well,
you may need to initialize SSL before calling `mg_start()`, and set the pre-
processor define SSL_ALREADY_INITIALIZED. This is not required if SSL is used
only within civetweb.
When master thread accepts new connection, a new accepted socket (described by
`struct socket`) it placed into the accepted sockets queue,