\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 */
| 2205 | * @since PROJ 7.2 |
| 2206 | */ |
| 2207 | void proj_context_set_ca_bundle_path(PJ_CONTEXT *ctx, const char *path) { |
| 2208 | if (!ctx) |
| 2209 | ctx = pj_get_default_ctx(); |
| 2210 | if (!ctx) |
| 2211 | return; |
| 2212 | pj_load_ini(ctx); |
| 2213 | try { |
| 2214 | ctx->set_ca_bundle_path(path != nullptr ? path : ""); |
| 2215 | } catch (const std::exception &) { |
| 2216 | } |
| 2217 | } |
| 2218 | |
| 2219 | // --------------------------------------------------------------------------- |
| 2220 |