mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Fix some TODOs
This commit is contained in:
@@ -137,7 +137,7 @@ int clock_gettime(int clk_id, struct timespec *t);
|
|||||||
int
|
int
|
||||||
clock_gettime(int clk_id, struct timespec *t)
|
clock_gettime(int clk_id, struct timespec *t)
|
||||||
{
|
{
|
||||||
memset(t, 0, sizeof(*t));
|
memset(t, 0, sizeof(*t));
|
||||||
if (clk_id == CLOCK_REALTIME) {
|
if (clk_id == CLOCK_REALTIME) {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
int rv = gettimeofday(&now, NULL);
|
int rv = gettimeofday(&now, NULL);
|
||||||
@@ -10082,30 +10082,6 @@ initialize_ssl(struct mg_context *ctx)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* TODO: check if this function is required at all */
|
|
||||||
static int
|
|
||||||
verify_ssl_client(int preverify_ok, X509_STORE_CTX *x509_ctx)
|
|
||||||
{
|
|
||||||
int ret = preverify_ok;
|
|
||||||
/*
|
|
||||||
TODO: store rejected connection attempts
|
|
||||||
char buf[256];
|
|
||||||
struct X509 *err_cert;
|
|
||||||
int err, depth;
|
|
||||||
SSL *ssl;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Ignore pre-verification - only accept clients we know locally */
|
|
||||||
(void)preverify_ok;
|
|
||||||
/*
|
|
||||||
err_cert = X509_STORE_CTX_get_current_cert(x509_st);
|
|
||||||
err = X509_STORE_CTX_get_error(x509_st);
|
|
||||||
depth = X509_STORE_CTX_get_error_depth(x509_st);
|
|
||||||
*/
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ssl_use_pem_file(struct mg_context *ctx, const char *pem)
|
ssl_use_pem_file(struct mg_context *ctx, const char *pem)
|
||||||
|
|||||||
@@ -2067,9 +2067,7 @@ change_password_file()
|
|||||||
static int
|
static int
|
||||||
manage_service(int action)
|
manage_service(int action)
|
||||||
{
|
{
|
||||||
static const char *service_name =
|
const char *service_name = g_server_name;
|
||||||
"Civetweb"; /* TODO (mid): check using server_name instead of
|
|
||||||
* service_name */
|
|
||||||
SC_HANDLE hSCM = NULL, hService = NULL;
|
SC_HANDLE hSCM = NULL, hService = NULL;
|
||||||
SERVICE_DESCRIPTION descr;
|
SERVICE_DESCRIPTION descr;
|
||||||
char path[PATH_MAX + 20] = ""; /* Path to executable plus magic argument */
|
char path[PATH_MAX + 20] = ""; /* Path to executable plus magic argument */
|
||||||
@@ -2126,6 +2124,7 @@ manage_service(int action)
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static LRESULT CALLBACK
|
static LRESULT CALLBACK
|
||||||
WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user