aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/microhttpd2.h')
-rw-r--r--src/include/microhttpd2.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index 063b2d98..e8671825 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -2181,6 +2181,41 @@ MHD_daemon_tls_mem_dhparams (struct MHD_Daemon *daemon,
2181 2181
2182 2182
2183/** 2183/**
2184 * Function called to lookup the pre shared key (@a psk) for a given
2185 * HTTP connection based on the @a username.
2186 *
2187 * @param cls closure
2188 * @param connection the HTTPS connection
2189 * @param username the user name claimed by the other side
2190 * @param psk[out] to be set to the pre-shared-key; should be allocated with malloc(),
2191 * will be freed by MHD
2192 * @param psk_size[out] to be set to the number of bytes in @a psk
2193 * @return 0 on success, -1 on errors
2194 */
2195typedef int
2196(*MHD_PskServerCredentialsCallback)(void *cls,
2197 const struct MHD_Connection *connection,
2198 const char *username,
2199 void **psk,
2200 size_t *psk_size);
2201
2202
2203/**
2204 * Configure PSK to use for the TLS key exchange.
2205 *
2206 * @param daemon daemon to configure tls for
2207 * @param psk_cb function to call to obtain pre-shared key
2208 * @param psk_cb_cls closure for @a psk_cb
2209 * @return #MHD_SC_OK upon success; TODO: define failure modes
2210 */
2211_MHD_EXTERN enum MHD_StatusCode
2212MHD_daemon_set_tls_psk_callback (struct MHD_Daemon *daemon,
2213 MHD_PskServerCredentialsCallback psk_cb,
2214 void *psk_cb_cls)
2215 MHD_NONNULL(1);
2216
2217
2218/**
2184 * Memory pointer for the certificate (ca.pem) to be used by the 2219 * Memory pointer for the certificate (ca.pem) to be used by the
2185 * HTTPS daemon for client authentification. 2220 * HTTPS daemon for client authentification.
2186 * 2221 *