Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
0071613a
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看板
提交
0071613a
编写于
8月 08, 2013
作者:
J
juh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8022461: Fix lint warnings in sun.security.{provider,rsa,x509}
Reviewed-by: darcy, weijun, xuelei, mullan
上级
5a873572
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
18 addition
and
12 deletion
+18
-12
src/share/classes/sun/security/provider/DSAPublicKey.java
src/share/classes/sun/security/provider/DSAPublicKey.java
+5
-3
src/share/classes/sun/security/rsa/RSAPublicKeyImpl.java
src/share/classes/sun/security/rsa/RSAPublicKeyImpl.java
+6
-5
src/share/classes/sun/security/rsa/RSASignature.java
src/share/classes/sun/security/rsa/RSASignature.java
+3
-1
src/share/classes/sun/security/x509/AlgIdDSA.java
src/share/classes/sun/security/x509/AlgIdDSA.java
+2
-2
src/share/classes/sun/security/x509/X509Key.java
src/share/classes/sun/security/x509/X509Key.java
+2
-1
未找到文件。
src/share/classes/sun/security/provider/DSAPublicKey.java
浏览文件 @
0071613a
/*
* Copyright (c) 1996, 20
05
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
13
, 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,6 +37,7 @@ import java.security.interfaces.DSAParams;
import
sun.security.x509.X509Key
;
import
sun.security.x509.AlgIdDSA
;
import
sun.security.util.BitArray
;
import
sun.security.util.Debug
;
import
sun.security.util.DerValue
;
import
sun.security.util.DerInputStream
;
...
...
@@ -88,8 +89,9 @@ implements java.security.interfaces.DSAPublicKey, Serializable {
algid
=
new
AlgIdDSA
(
p
,
q
,
g
);
try
{
ke
y
=
new
DerValue
(
DerValue
.
tag_Integer
,
byte
[]
keyArra
y
=
new
DerValue
(
DerValue
.
tag_Integer
,
y
.
toByteArray
()).
toByteArray
();
setKey
(
new
BitArray
(
keyArray
.
length
*
8
,
keyArray
));
encode
();
}
catch
(
IOException
e
)
{
throw
new
InvalidKeyException
(
"could not DER encode y: "
+
...
...
@@ -142,7 +144,7 @@ implements java.security.interfaces.DSAPublicKey, Serializable {
protected
void
parseKeyBits
()
throws
InvalidKeyException
{
try
{
DerInputStream
in
=
new
DerInputStream
(
key
);
DerInputStream
in
=
new
DerInputStream
(
getKey
().
toByteArray
()
);
y
=
in
.
getBigInteger
();
}
catch
(
IOException
e
)
{
throw
new
InvalidKeyException
(
"Invalid key: y value\n"
+
...
...
src/share/classes/sun/security/rsa/RSAPublicKeyImpl.java
浏览文件 @
0071613a
/*
* Copyright (c) 2003, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, 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
...
...
@@ -67,9 +67,10 @@ public final class RSAPublicKeyImpl extends X509Key implements RSAPublicKey {
DerOutputStream
out
=
new
DerOutputStream
();
out
.
putInteger
(
n
);
out
.
putInteger
(
e
);
DerValue
val
=
new
DerValue
(
DerValue
.
tag_Sequence
,
out
.
toByteArray
());
key
=
val
.
toByteArray
();
byte
[]
keyArray
=
new
DerValue
(
DerValue
.
tag_Sequence
,
out
.
toByteArray
()).
toByteArray
();
setKey
(
new
BitArray
(
keyArray
.
length
*
8
,
keyArray
));
}
catch
(
IOException
exc
)
{
// should never occur
throw
new
InvalidKeyException
(
exc
);
...
...
@@ -104,7 +105,7 @@ public final class RSAPublicKeyImpl extends X509Key implements RSAPublicKey {
*/
protected
void
parseKeyBits
()
throws
InvalidKeyException
{
try
{
DerInputStream
in
=
new
DerInputStream
(
key
);
DerInputStream
in
=
new
DerInputStream
(
getKey
().
toByteArray
()
);
DerValue
derValue
=
in
.
getDerValue
();
if
(
derValue
.
tag
!=
DerValue
.
tag_Sequence
)
{
throw
new
IOException
(
"Not a SEQUENCE"
);
...
...
src/share/classes/sun/security/rsa/RSASignature.java
浏览文件 @
0071613a
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, 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
...
...
@@ -244,12 +244,14 @@ public abstract class RSASignature extends SignatureSpi {
}
// set parameter, not supported. See JCA doc
@Deprecated
protected
void
engineSetParameter
(
String
param
,
Object
value
)
throws
InvalidParameterException
{
throw
new
UnsupportedOperationException
(
"setParameter() not supported"
);
}
// get parameter, not supported. See JCA doc
@Deprecated
protected
Object
engineGetParameter
(
String
param
)
throws
InvalidParameterException
{
throw
new
UnsupportedOperationException
(
"getParameter() not supported"
);
...
...
src/share/classes/sun/security/x509/AlgIdDSA.java
浏览文件 @
0071613a
/*
* Copyright (c) 1996, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
1
3, 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
...
...
@@ -96,7 +96,7 @@ class AlgIdDSA extends AlgorithmId implements DSAParams
* Default constructor. The OID and parameters must be
* deserialized before this algorithm ID is used.
*/
// XXX deprecated for general use
@Deprecated
public
AlgIdDSA
()
{}
AlgIdDSA
(
DerValue
val
)
throws
IOException
...
...
src/share/classes/sun/security/x509/X509Key.java
浏览文件 @
0071613a
/*
* Copyright (c) 1996, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 201
3
, 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
...
...
@@ -79,6 +79,7 @@ public class X509Key implements PublicKey {
* Added to keep the byte[] key form consistent with the BitArray
* form. Can de deleted when byte[] key is deleted.
*/
@Deprecated
private
int
unusedBits
=
0
;
/* BitArray form of key */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录