# HG changeset patch # User Adam Chlipala # Date 1307913390 14400 # Node ID 5415f1ded56405e57e756c4ea8dd3b6aa35a8159 # Parent f6b3fbf10dac669eb8bd6d9bfdd7776edd360192 Tell libcurl to use SSLv3 diff -r f6b3fbf10dac -r 5415f1ded564 src/c/openid.c --- a/src/c/openid.c Wed Jun 01 07:51:55 2011 -0400 +++ b/src/c/openid.c Sun Jun 12 17:16:30 2011 -0400 @@ -206,6 +206,7 @@ XML_SetCharacterDataHandler(cd.parser, cdata); curl_easy_reset(c); + curl_easy_setopt(c, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); curl_easy_setopt(c, CURLOPT_URL, id); curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, write_discovery_data); curl_easy_setopt(c, CURLOPT_WRITEDATA, &cd); @@ -217,6 +218,13 @@ uw_pop_cleanup(ctx); uw_pop_cleanup(ctx); + if (code) { + uw_Basis_debug(ctx, "CURL error:"); + uw_Basis_debug(ctx, (char*)curl_easy_strerror(code)); + } + else if (!dy->endpoint) + uw_Basis_debug(ctx, "Couldn't parse endpoint from page"); + if (code || !dy->endpoint) return NULL; else @@ -292,6 +300,7 @@ uw_buffer_append(inps, "", 1); curl_easy_reset(c); + curl_easy_setopt(c, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); curl_easy_setopt(c, CURLOPT_URL, url); curl_easy_setopt(c, CURLOPT_POSTFIELDS, inps->start); curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, write_buffer_data);