Browse Source

VS_no_verify implies don't check identity, either

David Rose 23 years ago
parent
commit
c5143316fd
1 changed files with 9 additions and 5 deletions
  1. 9 5
      panda/src/downloader/httpChannel.cxx

+ 9 - 5
panda/src/downloader/httpChannel.cxx

@@ -975,11 +975,15 @@ run_ssl_handshake() {
         << " / " << org_name << "\n";
     }
 
-    if (!verify_server(subject)) {
-      downloader_cat.info()
-        << "Server does not match any expected server.\n";
-      _state = S_failure;
-      return false;
+    if (_client->get_verify_ssl() != HTTPClient::VS_no_verify) {
+      // Check that the server is someone we expected to be talking
+      // to.
+      if (!verify_server(subject)) {
+        downloader_cat.info()
+          << "Server does not match any expected server.\n";
+        _state = S_failure;
+        return false;
+      }
     }
       
     X509_free(cert);