X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=9162d85e3f662765a80cc722bc27a06bf6a6c116;hp=5d382deb3439a6adf58c3bef6e81d7161ee5e7e4;hb=8f935cf74ce95a631788fb8a4cce4114df935a78;hpb=9df281f755a8afb07d90e36aae493ce963ab4d47 diff --git a/src/http.c b/src/http.c index 5d382deb..9162d85e 100644 --- a/src/http.c +++ b/src/http.c @@ -1187,29 +1187,12 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) { /* Initialize the SSL context. After this has once been done, it becomes a no-op. */ - switch (ssl_init ()) + if (!ssl_init ()) { - case SSLERRCTXCREATE: - /* this is fatal */ - logprintf (LOG_NOTQUIET, _("Failed to set up an SSL context\n")); - return SSLERRCTXCREATE; - case SSLERRCERTFILE: - /* try without certfile */ + scheme_disable (SCHEME_HTTPS); logprintf (LOG_NOTQUIET, - _("Failed to load certificates from %s\n"), - opt.cert_file); - logprintf (LOG_NOTQUIET, - _("Trying without the specified certificate\n")); - break; - case SSLERRCERTKEY: - logprintf (LOG_NOTQUIET, - _("Failed to get private key from %s\n"), - opt.private_key); - logprintf (LOG_NOTQUIET, - _("Trying without the specified certificate\n")); - break; - default: - break; + _("Disabling SSL due to encountered errors.\n")); + return SSLINITFAILED; } } #endif /* HAVE_SSL */ @@ -2232,7 +2215,7 @@ File `%s' already there, will not retrieve.\n"), *hstat.local_file); continue; break; case HOSTERR: case CONIMPOSSIBLE: case PROXERR: case AUTHFAILED: - case SSLERRCTXCREATE: case CONTNOTSUPPORTED: + case SSLINITFAILED: case CONTNOTSUPPORTED: /* Fatal errors just return from the function. */ free_hstat (&hstat); xfree_null (dummy);