From f46d10b8abc021f48d97757077235a16a04a5a24 Mon Sep 17 00:00:00 2001 From: Vinnie Ryan Date: Mon, 24 Aug 2015 16:22:37 +0100 Subject: [PATCH] Backport 79e58cc0e57717bb00b22a4716b7eb6f903441ef --- .../security/cert/CertPathValidator/OCSP/AIACheck.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java b/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java index 8c6e0458b33..8563f13e198 100644 --- a/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java +++ b/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java @@ -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 static void main(String args[]) throws Exception { 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; }