summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-01-08 19:18:24 +0100
committerChristian Grothoff <christian@grothoff.org>2024-01-08 19:18:24 +0100
commitef193efa2f1d6d3d111a082810b5ecc28947d16c (patch)
treec9bc50eac85736b258c9f8cad8f889a70bcffc9f /src/include
parent44b327f2d3f88b949651a8cb02c568f1ff3012d0 (diff)
downloadexchange-ef193efa2f1d6d3d111a082810b5ecc28947d16c.tar.gz
exchange-ef193efa2f1d6d3d111a082810b5ecc28947d16c.tar.bz2
exchange-ef193efa2f1d6d3d111a082810b5ecc28947d16c.zip
improve curl backwards compatibility, de-duplicate code
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_curl_lib.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/taler_curl_lib.h b/src/include/taler_curl_lib.h
index 04dc20b9e..f108e6158 100644
--- a/src/include/taler_curl_lib.h
+++ b/src/include/taler_curl_lib.h
@@ -79,4 +79,17 @@ void
TALER_curl_easy_post_finished (struct TALER_CURL_PostContext *ctx);
+/**
+ * Set a secure redirection policy, allowing a limited
+ * number of redirects and only going from HTTP to HTTPS
+ * but not from HTTPS to HTTP.
+ *
+ * @param[in,out] eh easy handle to modify
+ * @param url URL to base the redirect policy on;
+ * must start with "http://" or "https://"
+ */
+void
+TALER_curl_set_secure_redirect_policy (CURL *eh,
+ const char *url);
+
#endif