]> sjero.net Git - wget/blobdiff - src/http.c
License updates for some source files.
[wget] / src / http.c
index a8705aa4b53f759aa95c9c42b12d4cf5e823c2f0..dfe03ce0e4cb3ef686adbe2b48bacbf82bf7050e 100644 (file)
@@ -1762,11 +1762,16 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
 
       if (conn->scheme == SCHEME_HTTPS)
         {
-          if (!ssl_connect_wget (sock) || !ssl_check_certificate (sock, u->host))
+          if (!ssl_connect_wget (sock))
             {
               fd_close (sock);
               return CONSSLERR;
             }
+          else if (!ssl_check_certificate (sock, u->host))
+            {
+              fd_close (sock);
+              return VERIFCERTERR;
+            }
           using_ssl = true;
         }
 #endif /* HAVE_SSL */
@@ -2295,7 +2300,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
 # define FOPEN_OPT_ARGS "fop=sqo", "acc", acc_cb, &open_id
 # define FOPEN_BIN_FLAG 3
 #else /* def __VMS */
-# define FOPEN_BIN_FLAG 1
+# define FOPEN_BIN_FLAG true
 #endif /* def __VMS [else] */
 
   /* Open the local file.  */
@@ -2328,7 +2333,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
         }
       else
         {
-          fp = fopen_excl (hs->local_file, true);
+          fp = fopen_excl (hs->local_file, FOPEN_BIN_FLAG);
           if (!fp && errno == EEXIST)
             {
               /* We cannot just invent a new name and use it (which is
@@ -2598,7 +2603,7 @@ Spider mode enabled. Check if remote file exists.\n"));
           logprintf (LOG_NOTQUIET, _("Cannot write to %s (%s).\n"),
                      quote (hstat.local_file), strerror (errno));
         case HOSTERR: case CONIMPOSSIBLE: case PROXERR: case AUTHFAILED: 
-        case SSLINITFAILED: case CONTNOTSUPPORTED:
+        case SSLINITFAILED: case CONTNOTSUPPORTED: case VERIFCERTERR:
           /* Fatal errors just return from the function.  */
           ret = err;
           goto exit;