From: Shahar Klein Date: Tue, 28 Jul 2009 10:13:20 +0000 (+0200) Subject: Drop curl host check when using ESX without check X-Git-Tag: v0.7.0~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c153e200fff2c96a9ccdfce37321946fc002159;p=thirdparty%2Flibvirt.git Drop curl host check when using ESX without check * src/esx/esx_vi.c: drop host check if no_verify=1, but as Matthias pointed out if no_verify=2 we should check the host is the right one --- diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index 1087926acb..7a429761d9 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@ -239,6 +239,7 @@ esxVI_Context_Connect(virConnectPtr conn, esxVI_Context *ctx, const char *url, curl_easy_setopt(ctx->curl_handle, CURLOPT_HEADER, 0); curl_easy_setopt(ctx->curl_handle, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(ctx->curl_handle, CURLOPT_SSL_VERIFYPEER, noVerify ? 0 : 1); + curl_easy_setopt(ctx->curl_handle, CURLOPT_SSL_VERIFYHOST, noVerify ? 0 : 2); curl_easy_setopt(ctx->curl_handle, CURLOPT_COOKIEFILE, ""); curl_easy_setopt(ctx->curl_handle, CURLOPT_HTTPHEADER, ctx->curl_headers); curl_easy_setopt(ctx->curl_handle, CURLOPT_WRITEFUNCTION,