aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2018-09-26 23:57:33 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2018-09-26 23:57:33 +0300
commitda68f321e5e93968cfa383ba9dd6382852fd02ae (patch)
tree4d749b7349f0563a530f972ed9c4c91f64c1656a /src
parenta145baea795624a46cbdba90be691e8977118264 (diff)
downloadlibmicrohttpd-da68f321e5e93968cfa383ba9dd6382852fd02ae.tar.gz
libmicrohttpd-da68f321e5e93968cfa383ba9dd6382852fd02ae.zip
Fixed build without HTTPS support
Diffstat (limited to 'src')
-rw-r--r--src/microhttpd/daemon.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index cd7f91c7..a5d2d296 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -582,7 +582,7 @@ MHD_TLS_init (struct MHD_Daemon *daemon)
582 return GNUTLS_E_MEMORY_ERROR; 582 return GNUTLS_E_MEMORY_ERROR;
583 return MHD_init_daemon_certificate (daemon); 583 return MHD_init_daemon_certificate (daemon);
584 case GNUTLS_CRD_PSK: 584 case GNUTLS_CRD_PSK:
585 if (0 != 585 if (0 !=
586 gnutls_psk_allocate_server_credentials (&daemon->psk_cred)) 586 gnutls_psk_allocate_server_credentials (&daemon->psk_cred))
587 return GNUTLS_E_MEMORY_ERROR; 587 return GNUTLS_E_MEMORY_ERROR;
588 return 0; 588 return 0;
@@ -2139,12 +2139,11 @@ MHD_tls_push_func_(gnutls_transport_ptr_t trnsp,
2139 return MHD_send_ ((MHD_socket)(intptr_t)(trnsp), data, data_size); 2139 return MHD_send_ ((MHD_socket)(intptr_t)(trnsp), data, data_size);
2140} 2140}
2141#endif /* MHD_TLSLIB_DONT_SUPPRESS_SIGPIPE */ 2141#endif /* MHD_TLSLIB_DONT_SUPPRESS_SIGPIPE */
2142#endif /* HTTPS_SUPPORT */
2143 2142
2144 2143
2145/** 2144/**
2146 * Function called by GNUtls to obtain the PSK for a given session. 2145 * Function called by GNUtls to obtain the PSK for a given session.
2147 * 2146 *
2148 * @param session the session to lookup PSK for 2147 * @param session the session to lookup PSK for
2149 * @param username username to lookup PSK for 2148 * @param username username to lookup PSK for
2150 * @param key[out] where to write PSK 2149 * @param key[out] where to write PSK
@@ -2200,6 +2199,7 @@ psk_gnutls_adapter (gnutls_session_t session,
2200 free (app_psk); 2199 free (app_psk);
2201 return 0; 2200 return 0;
2202} 2201}
2202#endif /* HTTPS_SUPPORT */
2203 2203
2204 2204
2205/** 2205/**
@@ -3274,7 +3274,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
3274 else 3274 else
3275 { 3275 {
3276 const time_t second_left = earliest_deadline - now; 3276 const time_t second_left = earliest_deadline - now;
3277 3277
3278 if (((unsigned long long)second_left) > ULLONG_MAX / 1000) 3278 if (((unsigned long long)second_left) > ULLONG_MAX / 1000)
3279 *timeout = ULLONG_MAX; 3279 *timeout = ULLONG_MAX;
3280 else 3280 else
@@ -5177,17 +5177,20 @@ parse_options_va (struct MHD_Daemon *daemon,
5177 daemon->unescape_callback_cls = va_arg (ap, 5177 daemon->unescape_callback_cls = va_arg (ap,
5178 void *); 5178 void *);
5179 break; 5179 break;
5180#ifdef HTTPS_SUPPORT
5180 case MHD_OPTION_GNUTLS_PSK_CRED_HANDLER: 5181 case MHD_OPTION_GNUTLS_PSK_CRED_HANDLER:
5181 daemon->cred_callback = va_arg (ap, 5182 daemon->cred_callback = va_arg (ap,
5182 MHD_PskServerCredentialsCallback); 5183 MHD_PskServerCredentialsCallback);
5183 daemon->cred_callback_cls = va_arg (ap, 5184 daemon->cred_callback_cls = va_arg (ap,
5184 void *); 5185 void *);
5185 break; 5186 break;
5187#endif /* HTTPS_SUPPORT */
5186 default: 5188 default:
5187#ifdef HAVE_MESSAGES 5189#ifdef HAVE_MESSAGES
5188 if ( ( (opt >= MHD_OPTION_HTTPS_MEM_KEY) && 5190 if ( ( (opt >= MHD_OPTION_HTTPS_MEM_KEY) &&
5189 (opt <= MHD_OPTION_HTTPS_PRIORITIES) ) || 5191 (opt <= MHD_OPTION_HTTPS_PRIORITIES) ) ||
5190 (opt == MHD_OPTION_HTTPS_MEM_TRUST)) 5192 (opt == MHD_OPTION_HTTPS_MEM_TRUST) ||
5193 (opt == MHD_OPTION_GNUTLS_PSK_CRED_HANDLER) )
5191 { 5194 {
5192 MHD_DLOG (daemon, 5195 MHD_DLOG (daemon,
5193 _("MHD HTTPS option %d passed to MHD compiled without HTTPS support\n"), 5196 _("MHD HTTPS option %d passed to MHD compiled without HTTPS support\n"),