|
25 | 25 | import static org.archive.modules.fetcher.FetchStatusCodes.S_CONNECT_LOST; |
26 | 26 | import static org.archive.modules.fetcher.FetchStatusCodes.S_DOMAIN_PREREQUISITE_FAILURE; |
27 | 27 | import static org.archive.modules.fetcher.FetchStatusCodes.S_UNFETCHABLE_URI; |
| 28 | +import static org.archive.modules.fetcher.FetchStatusCodes.S_SSL_ERROR; |
28 | 29 | import static org.archive.modules.recrawl.RecrawlAttributeConstants.A_REFERENCE_LENGTH; |
29 | 30 |
|
30 | 31 | import java.io.IOException; |
|
42 | 43 | import java.util.logging.Logger; |
43 | 44 |
|
44 | 45 | import javax.net.ssl.SSLContext; |
| 46 | +import javax.net.ssl.SSLHandshakeException; |
45 | 47 | import javax.net.ssl.TrustManager; |
46 | 48 |
|
47 | | -import org.archive.url.URIException; |
48 | 49 | import org.apache.commons.lang3.StringUtils; |
49 | 50 | import org.apache.http.Header; |
50 | 51 | import org.apache.http.HttpHeaders; |
|
82 | 83 | import org.archive.modules.net.CrawlHost; |
83 | 84 | import org.archive.modules.net.CrawlServer; |
84 | 85 | import org.archive.modules.net.ServerCache; |
| 86 | +import org.archive.url.URIException; |
85 | 87 | import org.archive.util.Recorder; |
86 | 88 | import org.springframework.beans.factory.annotation.Autowired; |
87 | 89 | import org.springframework.context.Lifecycle; |
@@ -681,6 +683,9 @@ protected void innerProcess(final CrawlURI curi) throws InterruptedException { |
681 | 683 | } catch (ClientProtocolException e) { |
682 | 684 | failedExecuteCleanup(curi, e); |
683 | 685 | return; |
| 686 | + } catch (SSLHandshakeException e) { |
| 687 | + cleanup(curi, e, "executeMethod", S_SSL_ERROR); |
| 688 | + return; |
684 | 689 | } catch (IOException e) { |
685 | 690 | if ("handshake alert: unrecognized_name".equals(e.getMessage())) { |
686 | 691 | req.setDisableSNI(true); |
|
0 commit comments