Bläddra i källkod

* methods/https.cc:
- fix CURLOPT_SSL_VERIFYHOST by really passing 2 to it if enabled

David Kalnischkies 15 år sedan
förälder
incheckning
52b22cea95
3 ändrade filer med 207 tillägg och 197 borttagningar
  1. 3 1
      debian/changelog
  2. 2 4
      methods/https.cc
  3. 202 192
      po/apt-all.pot

+ 3 - 1
debian/changelog

@@ -22,8 +22,10 @@ apt (0.8.11+wheezy) unstable; urgency=low
       are real files to avoid endless loops if not (Closes: #604401)
       are real files to avoid endless loops if not (Closes: #604401)
   * apt-pkg/contrib/weakptr.h:
   * apt-pkg/contrib/weakptr.h:
     - include stddefs.h to fix compile error (undefined NULL) with gcc-4.6
     - include stddefs.h to fix compile error (undefined NULL) with gcc-4.6
+  * methods/https.cc:
+    - fix CURLOPT_SSL_VERIFYHOST by really passing 2 to it if enabled
 
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 12 Jan 2011 17:14:14 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 12 Jan 2011 23:46:08 +0100
 
 
 apt (0.8.10) unstable; urgency=low
 apt (0.8.10) unstable; urgency=low
 
 

+ 2 - 4
methods/https.cc

@@ -143,13 +143,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, peer_verify);
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, peer_verify);
 
 
    // ... and hostname against cert CN or subjectAltName
    // ... and hostname against cert CN or subjectAltName
-   int default_verify = 2;
    bool verify = _config->FindB("Acquire::https::Verify-Host",true);
    bool verify = _config->FindB("Acquire::https::Verify-Host",true);
    knob = "Acquire::https::"+remotehost+"::Verify-Host";
    knob = "Acquire::https::"+remotehost+"::Verify-Host";
    verify = _config->FindB(knob.c_str(),verify);
    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
    // Also enforce issuer of server certificate using its cert
    string issuercert = _config->Find("Acquire::https::IssuerCert","");
    string issuercert = _config->Find("Acquire::https::IssuerCert","");

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 202 - 192
po/apt-all.pot