aboutsummaryrefslogtreecommitdiff
path: root/src/filemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/filemanager.cpp')
-rw-r--r--src/filemanager.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/filemanager.cpp b/src/filemanager.cpp
index 9652087b..29e85fbc 100644
--- a/src/filemanager.cpp
+++ b/src/filemanager.cpp
@@ -1988,3 +1988,34 @@ void pj_set_searchpath(int count, const char **path) {
proj_context_set_search_paths(nullptr, count,
const_cast<const char *const *>(path));
}
+
+
+/************************************************************************/
+/* proj_context_set_ca_bundle_path() */
+/************************************************************************/
+
+/** \brief Sets CA Bundle path.
+ *
+ * Those CA Bundle path will be used by PROJ when curl and PROJ_NETWORK
+ * are enabled.
+ *
+ * If set on the default context, they will be inherited by contexts created
+ * later.
+ *
+ * The path should be encoded in UTF-8.
+ *
+ * @param ctx PROJ context, or NULL for the default context.
+ * @param path Path. May be NULL.
+ *
+ * @since PROJ 7.2
+ */
+void proj_context_set_ca_bundle_path(PJ_CONTEXT *ctx, const char *path) {
+ if (!ctx)
+ ctx = pj_get_default_ctx();
+ if (!ctx)
+ return;
+ try {
+ ctx->set_ca_bundle_path(path != nullptr ? path : "");
+ } catch (const std::exception &) {
+ }
+}