8132786: java/security/cert/CertPathValidator/OCSP/AIACheck.java fails intermittently

Reviewed-by: mullan
This commit is contained in:
Vinnie Ryan 2015-08-24 16:22:37 +01:00
parent b7e143e8f6
commit 79e58cc0e5

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -37,7 +37,7 @@
*/
import java.io.*;
import java.net.SocketException;
import java.net.*;
import java.util.*;
import java.security.Security;
import java.security.cert.*;
@ -94,7 +94,9 @@ public class AIACheck {
throw new Exception("Successfully validated an invalid path");
} catch (CertPathValidatorException e ) {
if (! (e.getCause() instanceof SocketException)) {
Throwable rootCause = e.getCause();
if (!(rootCause instanceof SocketException ||
rootCause instanceof SocketTimeoutException)) {
throw e;
}