提交 347299f0 编写于 作者: M mullan

8011313: OCSP timeout set to wrong value if com.sun.security.ocsp.timeout not defined

Reviewed-by: vinnie
上级 a7836c78
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -85,10 +85,9 @@ public final class OCSP { ...@@ -85,10 +85,9 @@ public final class OCSP {
* value is negative, set the timeout length to the default. * value is negative, set the timeout length to the default.
*/ */
private static int initializeTimeout() { private static int initializeTimeout() {
int tmp = java.security.AccessController.doPrivileged( Integer tmp = java.security.AccessController.doPrivileged(
new GetIntegerAction("com.sun.security.ocsp.timeout", new GetIntegerAction("com.sun.security.ocsp.timeout"));
DEFAULT_CONNECT_TIMEOUT)); if (tmp == null || tmp < 0) {
if (tmp < 0) {
return DEFAULT_CONNECT_TIMEOUT; return DEFAULT_CONNECT_TIMEOUT;
} }
// Convert to milliseconds, as the system property will be // Convert to milliseconds, as the system property will be
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册