From: Andrej Kacian Date: Thu, 18 Jun 2015 21:39:12 +0000 (+0200) Subject: RSSyl: Use our CA certificate bundle on Windows. X-Git-Tag: 3.12.0~103 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e7d7deb012e1d5550d2586bb34962ebd4d580055;ds=sidebyside RSSyl: Use our CA certificate bundle on Windows. Libcurl seems to want a CA cert bundle for any https connection, even if verification is disabled. On Windows, there is no default bundle or directory libcurl knows about, so we give it our own, pointed to by claws_ssl_get_cert_file(). --- diff --git a/src/plugins/rssyl/rssyl_update_feed.c b/src/plugins/rssyl/rssyl_update_feed.c index 51d6c97f6..0f3361690 100644 --- a/src/plugins/rssyl/rssyl_update_feed.c +++ b/src/plugins/rssyl/rssyl_update_feed.c @@ -169,6 +169,12 @@ RFetchCtx *rssyl_prep_fetchctx_from_item(RFolderItem *ritem) feed_set_cookies_path(ctx->feed, rssyl_prefs_get()->cookies_path); feed_set_ssl_verify_peer(ctx->feed, ritem->ssl_verify_peer); feed_set_auth(ctx->feed, ritem->auth); +#ifdef G_OS_WIN32 + if (!g_ascii_strncasecmp(ritem->url, "https", 5)) { + feed_set_cacert_file(ctx->feed, claws_ssl_get_cert_file()); + debug_print("RSSyl: using cert file '%s'\n", feed_get_cacert_file(ctx->feed)); + } +#endif return ctx; } @@ -188,6 +194,12 @@ RFetchCtx *rssyl_prep_fetchctx_from_url(gchar *url) feed_set_timeout(ctx->feed, prefs_common.io_timeout_secs); feed_set_cookies_path(ctx->feed, rssyl_prefs_get()->cookies_path); feed_set_ssl_verify_peer(ctx->feed, rssyl_prefs_get()->ssl_verify_peer); +#ifdef G_OS_WIN32 + if (!g_ascii_strncasecmp(ritem->url, "https", 5)) { + feed_set_cacert_file(ctx->feed, claws_ssl_get_cert_file()); + debug_print("RSSyl: using cert file '%s'\n", feed_get_cacert_file(ctx->feed)); + } +#endif return ctx; }