Mercurial > openid
diff src/c/openid.c @ 40:5415f1ded564
Tell libcurl to use SSLv3
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 12 Jun 2011 17:16:30 -0400 |
parents | 8d23d76b5d48 |
children | a77f4cd1336d |
line wrap: on
line diff
--- 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);