diff -Naur curl-7.10.5/docs/curl.1 curl-7.10.5.new/docs/curl.1
--- curl-7.10.5/docs/curl.1	2003-05-12 14:40:13.000000000 +0200
+++ curl-7.10.5.new/docs/curl.1	2003-06-02 20:02:02.000000000 +0200
@@ -244,6 +244,14 @@
 if the --cacert file contains many CA certificates.
 
 If this option is used several times, the last one will be used.
+.IP "--dont-verify-CN"
+(HTTPS) Normally curl verifies the Common Name field of the peer\'s certificate
+to match the requested host. This prevents access to the host directly by
+it\'s IP address or by a different name. Using --dont-verify-CN allows curl
+to accept the connection even if the Common Name does not match but the
+certificate was successfully verified otherwise.
+
+If this option is used twice, the second will again disable --dont-verify-CN.
 .IP "-f/--fail"
 (HTTP) Fail silently (no output at all) on server errors. This is mostly done
 like this to better enable scripts etc to better deal with failed attempts. In
diff -Naur curl-7.10.5/src/main.c curl-7.10.5.new/src/main.c
--- curl-7.10.5/src/main.c	2003-05-12 14:45:57.000000000 +0200
+++ curl-7.10.5.new/src/main.c	2003-06-02 16:43:40.000000000 +0200
@@ -363,6 +363,7 @@
        "    --cacert <file> CA certificate to verify peer against (SSL)\n"
        "    --capath <directory> CA directory (made using c_rehash) to verify\n"
        "                    peer against (SSL)\n"
+       "    --dont-verify-CN do not check the Common Name part of the peer certificate\n"
        "    --ciphers <list> What SSL ciphers to use (SSL)\n"
        "    --compressed    Request a compressed response (using deflate or gzip).");
   puts("    --connect-timeout <seconds> Maximum time allowed for connection\n"
@@ -499,6 +500,7 @@
   bool globoff;
   bool use_httpget;
   bool insecure_ok; /* set TRUE to allow insecure SSL connects */
+  bool dont_verify_CN;
   bool create_dirs;
 
   char *writeout; /* %-styled format string to output */
@@ -1057,7 +1059,8 @@
     {"Ed","key-type",    TRUE},
     {"Ee","pass",        TRUE},
     {"Ef","engine",      TRUE},
-    {"Eg","capath ",     TRUE},
+    {"Eg","capath",      TRUE},
+    {"Eh","dont-verify-CN", FALSE},
     {"f", "fail",        FALSE},
     {"F", "form",        TRUE},
     {"g", "globoff",     FALSE},
@@ -1433,6 +1436,9 @@
         /* CA cert directory */
         GetStr(&config->capath, nextarg);
         break;
+      case 'h': /* do not verify peer's Common Name */
+	config->dont_verify_CN ^= TRUE;
+        break;
       default: /* certificate file */
         {
           char *ptr = strchr(nextarg, ':');
@@ -2868,6 +2874,9 @@
         if (config->capath)
           curl_easy_setopt(curl, CURLOPT_CAPATH, config->capath);
         curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, TRUE);
+	if( config->dont_verify_CN ) {
+          curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
+	}
       }
       else
         if(config->insecure_ok) {

