# HG changeset patch # User mullan # Date 1366903109 14400 # Node ID 78d08fc2dd12b2b6835a9d9ae781ea3f37eb9aff # Parent 10ad4a4330bcd921c394dd1d4b48c079b249a40e 8011313: OCSP timeout set to wrong value if com.sun.security.ocsp.timeout not defined Reviewed-by: vinnie diff -r 10ad4a4330bc -r 78d08fc2dd12 src/share/classes/sun/security/provider/certpath/OCSP.java --- a/src/share/classes/sun/security/provider/certpath/OCSP.java Tue Apr 23 09:28:19 2013 -0700 +++ b/src/share/classes/sun/security/provider/certpath/OCSP.java Thu Apr 25 11:18:29 2013 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2013, 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 @@ -85,10 +85,9 @@ * value is negative, set the timeout length to the default. */ private static int initializeTimeout() { - int tmp = java.security.AccessController.doPrivileged( - new GetIntegerAction("com.sun.security.ocsp.timeout", - DEFAULT_CONNECT_TIMEOUT)); - if (tmp < 0) { + Integer tmp = java.security.AccessController.doPrivileged( + new GetIntegerAction("com.sun.security.ocsp.timeout")); + if (tmp == null || tmp < 0) { return DEFAULT_CONNECT_TIMEOUT; } // Convert to milliseconds, as the system property will be