libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 7c7af4340fd283acb085b3c12b8cc4a128b4e678
parent 570042a100813c7a22377a27ff10ced2c073b362
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Fri,  3 Apr 2015 13:03:19 +0000

Add MHD_FEATURE_HTTPS_KEY_PASSWORD

Diffstat:
Msrc/include/microhttpd.h | 12++++++++++--
Msrc/microhttpd/daemon.c | 6++++++
2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -130,7 +130,7 @@ typedef intptr_t ssize_t; * Current version of the library. * 0x01093001 = 1.9.30-1. */ -#define MHD_VERSION 0x00093905 +#define MHD_VERSION 0x00093906 /** * MHD-internal return code for "YES". @@ -870,6 +870,7 @@ enum MHD_OPTION * to be used by the HTTPS daemon. This option should be followed by a * `const char *` argument. * This should be used in conjunction with #MHD_OPTION_HTTPS_MEM_KEY. + * @sa ::MHD_FEATURE_HTTPS_KEY_PASSWORD */ MHD_OPTION_HTTPS_KEY_PASSWORD = 26, @@ -2638,7 +2639,14 @@ enum MHD_FEATURE * #MHD_destroy_post_processor() can * be used. */ - MHD_FEATURE_POSTPROCESSOR = 13 + MHD_FEATURE_POSTPROCESSOR = 13, + + /** + * Get whether password encrypted private key for HTTPS daemon is + * supported. If supported then option + * ::MHD_OPTION_HTTPS_KEY_PASSWORD can be used. + */ + MHD_FEATURE_HTTPS_KEY_PASSWORD = 14 }; diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -4634,6 +4634,12 @@ MHD_is_feature_supported(enum MHD_FEATURE feature) #else return MHD_NO; #endif + case MHD_FEATURE_HTTPS_KEY_PASSWORD: +#if HTTPS_SUPPORT && GNUTLS_VERSION_NUMBER >= 0x030100 + return MHD_YES; +#else + return MHD_NO; +#endif } return MHD_NO; }