Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
efbc70ce
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
efbc70ce
编写于
6月 02, 2008
作者:
W
wetmore
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
e824f1ca
fbf34fe7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
53 addition
and
41 deletion
+53
-41
src/share/classes/sun/security/provider/certpath/OCSPChecker.java
...e/classes/sun/security/provider/certpath/OCSPChecker.java
+18
-11
src/solaris/native/java/net/PlainSocketImpl.c
src/solaris/native/java/net/PlainSocketImpl.c
+20
-7
test/sun/security/pkcs11/Cipher/TestSymmCiphers.java
test/sun/security/pkcs11/Cipher/TestSymmCiphers.java
+10
-20
test/sun/security/tools/keytool/autotest.sh
test/sun/security/tools/keytool/autotest.sh
+5
-3
未找到文件。
src/share/classes/sun/security/provider/certpath/OCSPChecker.java
浏览文件 @
efbc70ce
...
@@ -102,7 +102,7 @@ class OCSPChecker extends PKIXCertPathChecker {
...
@@ -102,7 +102,7 @@ class OCSPChecker extends PKIXCertPathChecker {
*/
*/
public
void
init
(
boolean
forward
)
throws
CertPathValidatorException
{
public
void
init
(
boolean
forward
)
throws
CertPathValidatorException
{
if
(!
forward
)
{
if
(!
forward
)
{
remainingCerts
=
certs
.
length
;
remainingCerts
=
certs
.
length
+
1
;
}
else
{
}
else
{
throw
new
CertPathValidatorException
(
throw
new
CertPathValidatorException
(
"Forward checking not supported"
);
"Forward checking not supported"
);
...
@@ -131,14 +131,22 @@ class OCSPChecker extends PKIXCertPathChecker {
...
@@ -131,14 +131,22 @@ class OCSPChecker extends PKIXCertPathChecker {
InputStream
in
=
null
;
InputStream
in
=
null
;
OutputStream
out
=
null
;
OutputStream
out
=
null
;
// Decrement the certificate counter
remainingCerts
--;
try
{
try
{
// Examine OCSP properties
X509Certificate
responderCert
=
null
;
X509Certificate
responderCert
=
null
;
boolean
seekResponderCert
=
false
;
boolean
seekResponderCert
=
false
;
X500Principal
responderSubjectName
=
null
;
X500Principal
responderSubjectName
=
null
;
X500Principal
responderIssuerName
=
null
;
X500Principal
responderIssuerName
=
null
;
BigInteger
responderSerialNumber
=
null
;
BigInteger
responderSerialNumber
=
null
;
boolean
seekIssuerCert
=
true
;
X509CertImpl
issuerCertImpl
=
null
;
X509CertImpl
currCertImpl
=
X509CertImpl
.
toImpl
((
X509Certificate
)
cert
);
/*
/*
* OCSP security property values, in the following order:
* OCSP security property values, in the following order:
* 1. ocsp.responderURL
* 1. ocsp.responderURL
...
@@ -148,6 +156,9 @@ class OCSPChecker extends PKIXCertPathChecker {
...
@@ -148,6 +156,9 @@ class OCSPChecker extends PKIXCertPathChecker {
*/
*/
String
[]
properties
=
getOCSPProperties
();
String
[]
properties
=
getOCSPProperties
();
// Check whether OCSP is feasible before seeking cert information
URL
url
=
getOCSPServerURL
(
currCertImpl
,
properties
);
// When responder's subject name is set then the issuer/serial
// When responder's subject name is set then the issuer/serial
// properties are ignored
// properties are ignored
if
(
properties
[
1
]
!=
null
)
{
if
(
properties
[
1
]
!=
null
)
{
...
@@ -172,14 +183,9 @@ class OCSPChecker extends PKIXCertPathChecker {
...
@@ -172,14 +183,9 @@ class OCSPChecker extends PKIXCertPathChecker {
seekResponderCert
=
true
;
seekResponderCert
=
true
;
}
}
boolean
seekIssuerCert
=
true
;
// Set the issuer certificate to the next cert in the chain
X509CertImpl
issuerCertImpl
=
null
;
// (unless we're processing the final cert).
X509CertImpl
currCertImpl
=
if
(
remainingCerts
<
certs
.
length
)
{
X509CertImpl
.
toImpl
((
X509Certificate
)
cert
);
remainingCerts
--;
// Set the issuer certificate
if
(
remainingCerts
!=
0
)
{
issuerCertImpl
=
X509CertImpl
.
toImpl
(
certs
[
remainingCerts
]);
issuerCertImpl
=
X509CertImpl
.
toImpl
(
certs
[
remainingCerts
]);
seekIssuerCert
=
false
;
// done
seekIssuerCert
=
false
;
// done
...
@@ -312,7 +318,8 @@ class OCSPChecker extends PKIXCertPathChecker {
...
@@ -312,7 +318,8 @@ class OCSPChecker extends PKIXCertPathChecker {
// Construct an OCSP Request
// Construct an OCSP Request
OCSPRequest
ocspRequest
=
OCSPRequest
ocspRequest
=
new
OCSPRequest
(
currCertImpl
,
issuerCertImpl
);
new
OCSPRequest
(
currCertImpl
,
issuerCertImpl
);
URL
url
=
getOCSPServerURL
(
currCertImpl
,
properties
);
// Use the URL to the OCSP service that was created earlier
HttpURLConnection
con
=
(
HttpURLConnection
)
url
.
openConnection
();
HttpURLConnection
con
=
(
HttpURLConnection
)
url
.
openConnection
();
if
(
DEBUG
!=
null
)
{
if
(
DEBUG
!=
null
)
{
DEBUG
.
println
(
"connecting to OCSP service at: "
+
url
);
DEBUG
.
println
(
"connecting to OCSP service at: "
+
url
);
...
...
src/solaris/native/java/net/PlainSocketImpl.c
浏览文件 @
efbc70ce
...
@@ -358,15 +358,28 @@ Java_java_net_PlainSocketImpl_socketConnect(JNIEnv *env, jobject this,
...
@@ -358,15 +358,28 @@ Java_java_net_PlainSocketImpl_socketConnect(JNIEnv *env, jobject this,
* See 6343810.
* See 6343810.
*/
*/
while
(
1
)
{
while
(
1
)
{
fd_set
wr
,
ex
;
#ifndef USE_SELECT
{
fprintf
(
stdout
,
"
\n
NATIVE: fd = %d] "
,
fd
);
struct
pollfd
pfd
;
pfd
.
fd
=
fd
;
pfd
.
events
=
POLLOUT
;
FD_ZERO
(
&
wr
);
connect_rv
=
NET_Poll
(
&
pfd
,
1
,
-
1
);
FD_SET
(
fd
,
&
wr
);
}
FD_ZERO
(
&
ex
);
#else
FD_SET
(
fd
,
&
ex
);
{
fd_set
wr
,
ex
;
FD_ZERO
(
&
wr
);
FD_SET
(
fd
,
&
wr
);
FD_ZERO
(
&
ex
);
FD_SET
(
fd
,
&
ex
);
connect_rv
=
NET_Select
(
fd
+
1
,
0
,
&
wr
,
&
ex
,
0
);
}
#endif
errno
=
0
;
connect_rv
=
NET_Select
(
fd
+
1
,
0
,
&
wr
,
&
ex
,
0
);
if
(
connect_rv
==
JVM_IO_ERR
)
{
if
(
connect_rv
==
JVM_IO_ERR
)
{
if
(
errno
==
EINTR
)
{
if
(
errno
==
EINTR
)
{
continue
;
continue
;
...
...
test/sun/security/pkcs11/Cipher/TestSymmCiphers.java
浏览文件 @
efbc70ce
...
@@ -2,32 +2,22 @@
...
@@ -2,32 +2,22 @@
* Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2008 Sun Microsystems, Inc. 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 modi
* This code is free software; you can redistribute it and/or modify it
fy it
* under the terms of the GNU General Public License version 2 only, as
* under the terms of the GNU General Public License version 2 onl
y, as
* published by the Free Software Foundation.
* published by the Free Software Foundation.
*
*
* This code is distributed in the hope that it will be useful, bu
* This code is distributed in the hope that it will be useful, but WITHOUT
t WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* ANY WARRANTY; without even the implied warranty of MERCHANTABIL
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ITY or
* version 2 for more details (a copy is included in the LICENSE file that
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public L
icense
* version 2 for more details (a copy is included in the LICENSE f
ile that
* accompanied this code).
* accompanied this code).
*
*
* You should have received a copy of the GNU General Public Licen
* You should have received a copy of the GNU General Public License version
se version
* 2 along with this work; if not, write to the Free Software Foundation,
* 2 along with this work; if not, write to the Free Software Foun
dation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, San
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
ta Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* CA 95054 USA or visit www.sun.com if you need additional inform
ation or
* have any questions.
* have any questions.
*/
*/
...
...
test/sun/security/tools/keytool/autotest.sh
浏览文件 @
efbc70ce
#
#
# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2006
-2008
Sun Microsystems, Inc. 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
...
@@ -90,7 +90,8 @@ chmod u+w cert8.db
...
@@ -90,7 +90,8 @@ chmod u+w cert8.db
echo
|
${
TESTJAVA
}${
FS
}
bin
${
FS
}
java
-Dfile
-Dnss
\
echo
|
${
TESTJAVA
}${
FS
}
bin
${
FS
}
java
-Dfile
-Dnss
\
-Dnss
.lib
=
${
NSS
}${
FS
}
lib
${
FS
}${
PF
}${
FS
}${
LIBNAME
}
\
-Dnss
.lib
=
${
NSS
}${
FS
}
lib
${
FS
}${
PF
}${
FS
}${
LIBNAME
}
\
KeyToolTest
||
exit
12
KeyToolTest
status
=
$?
rm
-f
p11-nss.txt
rm
-f
p11-nss.txt
rm
-f
cert8.db
rm
-f
cert8.db
...
@@ -101,4 +102,5 @@ rm HumanInputStream*.class
...
@@ -101,4 +102,5 @@ rm HumanInputStream*.class
rm
KeyToolTest.class
rm
KeyToolTest.class
rm
TestException.class
rm
TestException.class
exit
$?
exit
$status
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录