diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-16 17:40:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-16 17:40:37 +0200 |
commit | ee1fbffa1c42f7ac3fc897e73e90c525037dd915 (patch) | |
tree | b8b5f553413fb99a92a59786862ba25049f62725 /src/include | |
parent | 23820348b1221c78dc2d4eca9a234c375bbc68cb (diff) | |
download | gnunet-ee1fbffa1c42f7ac3fc897e73e90c525037dd915.tar.gz gnunet-ee1fbffa1c42f7ac3fc897e73e90c525037dd915.zip |
support context-wide client authentication
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_curl_lib.h | 36 |
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 | */ | ||
255 | void | ||
256 | GNUNET_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 | */ | ||
275 | void | ||
276 | GNUNET_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. |