aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r--src/include/microhttpd.h38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index cdbde609..f43935c7 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -1167,6 +1167,25 @@ typedef void
1167 1167
1168 1168
1169/** 1169/**
1170 * Function called to lookup the pre shared key (@a psk) for a given
1171 * HTTP connection based on the @a username.
1172 *
1173 * @param cls closure
1174 * @param connection the HTTPS connection
1175 * @param username the user name claimed by the other side
1176 * @param psk[out] to be set to the pre-shared-key; should be allocated with malloc(),
1177 * will be freed by MHD
1178 * @param psk_size[out] to be set to the number of bytes in @a psk
1179 * @return 0 on success, -1 on errors
1180 */
1181typedef int
1182(*MHD_PskServerCredentialsCallback)(void *cls,
1183 const struct MHD_Connection *connection,
1184 const char *username,
1185 void **psk,
1186 size_t *psk_size);
1187
1188/**
1170 * @brief MHD options. 1189 * @brief MHD options.
1171 * 1190 *
1172 * Passed in the varargs portion of #MHD_start_daemon. 1191 * Passed in the varargs portion of #MHD_start_daemon.
@@ -1489,7 +1508,15 @@ enum MHD_OPTION
1489 * testing clients against MHD, and 0 in production. This option 1508 * testing clients against MHD, and 0 in production. This option
1490 * should be followed by an `int` argument. 1509 * should be followed by an `int` argument.
1491 */ 1510 */
1492 MHD_OPTION_STRICT_FOR_CLIENT = 29 1511 MHD_OPTION_STRICT_FOR_CLIENT = 29,
1512
1513 /**
1514 * This should be a pointer to callback of type
1515 * gnutls_psk_server_credentials_function that will be given to
1516 * gnutls_psk_set_server_credentials_function. It is used to
1517 * retrieve the shared key for a given username.
1518 */
1519 MHD_OPTION_GNUTLS_PSK_CRED_HANDLER = 30
1493}; 1520};
1494 1521
1495 1522
@@ -3150,10 +3177,11 @@ MHD_free (void *ptr);
3150 */ 3177 */
3151_MHD_EXTERN int 3178_MHD_EXTERN int
3152MHD_digest_auth_check (struct MHD_Connection *connection, 3179MHD_digest_auth_check (struct MHD_Connection *connection,
3153 const char *realm, 3180 const char *realm,
3154 const char *username, 3181 const char *username,
3155 const char *password, 3182 const char *password,
3156 unsigned int nonce_timeout); 3183 unsigned int nonce_timeout);
3184
3157 3185
3158/** 3186/**
3159 * Authenticates the authorization header sent by the client 3187 * Authenticates the authorization header sent by the client