aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-16 17:40:14 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-16 17:40:37 +0200
commitee1fbffa1c42f7ac3fc897e73e90c525037dd915 (patch)
treeb8b5f553413fb99a92a59786862ba25049f62725 /src/include
parent23820348b1221c78dc2d4eca9a234c375bbc68cb (diff)
downloadgnunet-ee1fbffa1c42f7ac3fc897e73e90c525037dd915.tar.gz
gnunet-ee1fbffa1c42f7ac3fc897e73e90c525037dd915.zip
support context-wide client authentication
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_curl_lib.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h
index 875cfa3bd..0bb337ee7 100644
--- a/src/include/gnunet_curl_lib.h
+++ b/src/include/gnunet_curl_lib.h
@@ -245,6 +245,42 @@ GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx,
245 245
246 246
247/** 247/**
248 * Force use of the provided username and password
249 * for client authentication for all operations performed
250 * with @a ctx.
251 *
252 * @param ctx context to set authentication data for
253 * @param userpass string with "$USERNAME:$PASSWORD"
254 */
255void
256GNUNET_CURL_set_userpass (struct GNUNET_CURL_Context *ctx,
257 const char *userpass);
258
259
260/**
261 * Force use of the provided TLS client certificate
262 * for client authentication for all operations performed
263 * with @a ctx.
264 *
265 * Note that if the provided information is incorrect,
266 * the earliest operation that could fail is
267 * #GNUNET_CURL_job_add() or #GNUNET_CURL_job_add2()!
268 *
269 * @param ctx context to set authentication data for
270 * @param certtype type of the certificate
271 * @param certfile file with the certificate
272 * @param keyfile file with the private key
273 * @param keypass passphrase to decrypt @a keyfile (or NULL)
274 */
275void
276GNUNET_CURL_set_tlscert (struct GNUNET_CURL_Context *ctx,
277 const char *certtype,
278 const char *certfile,
279 const char *keyfile,
280 const char *keypass);
281
282
283/**
248 * Schedule a CURL request to be executed and call the given @a jcc 284 * Schedule a CURL request to be executed and call the given @a jcc
249 * upon its completion. Note that the context will make use of the 285 * upon its completion. Note that the context will make use of the
250 * CURLOPT_PRIVATE facility of the CURL @a eh. 286 * CURLOPT_PRIVATE facility of the CURL @a eh.