diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-02-08 11:02:46 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-02-08 11:02:46 +0100 |
commit | 86e2dc4dd728924d71995ebaeb83a4d9abba94d5 (patch) | |
tree | b535bac6a1c5d75a3db5c810fb225c1e26f080b7 /methods/https.cc | |
parent | de6d91438ef2e3632615647647099f4c6fa227fa (diff) | |
parent | 33e46bc7032c2bcab654ab3f6a0a10ad82264ead (diff) |
merged from the debian-sid branch
Diffstat (limited to 'methods/https.cc')
-rw-r--r-- | methods/https.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/methods/https.cc b/methods/https.cc index aa6786aa8..fc649d6c2 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -143,13 +143,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, peer_verify); // ... and hostname against cert CN or subjectAltName - int default_verify = 2; bool verify = _config->FindB("Acquire::https::Verify-Host",true); knob = "Acquire::https::"+remotehost+"::Verify-Host"; verify = _config->FindB(knob.c_str(),verify); - if (!verify) - default_verify = 0; - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, verify); + int const default_verify = (verify == true) ? 2 : 0; + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, default_verify); // Also enforce issuer of server certificate using its cert string issuercert = _config->Find("Acquire::https::IssuerCert",""); |