changeset 6005:51d6934d1d7d

8011313: OCSP timeout set to wrong value if com.sun.security.ocsp.timeout not defined Reviewed-by: vinnie
author mullan
date Thu, 25 Apr 2013 14:45:16 -0700
parents 9f59600aea52
children 023297d5b047
files src/share/classes/sun/security/provider/certpath/OCSP.java
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/provider/certpath/OCSP.java	Mon Dec 03 11:07:20 2012 -0500
+++ b/src/share/classes/sun/security/provider/certpath/OCSP.java	Thu Apr 25 14:45:16 2013 -0700
@@ -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
@@ -80,10 +80,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) {
             tmp = DEFAULT_CONNECT_TIMEOUT;
         }
         // Convert to milliseconds, as the system property will be